text:
How long does it take to type this?
Introduction
I can type at a moderate pace, using the QWERTY keyboard layout. But if a word like yellowwooddoor has a ton of repeated letters, it takes a bit longer to type it. Even worse is when a word like "jump" has the same finger used for multiple different consecutive letters.
Here's how long it takes me to type letters on each finger (very unscientifically measured):
Columns are Finger name, keystrokes/second, seconds/keystroke, and the keys used by each finger
Typing same letter twice:
L Pinky 5.2 0.1923076923 1qaz
L Ring  5   0.2          2wsx
L Mid   5.3 0.1886792453 3edc
L Index 5.5 0.1818181818 4rfv5tgb
R Thumb 6.5 0.1538461538 [space]
R Index 6.9 0.1449275362 6yhn7ujm
R Mid   6.3 0.1587301587 8ik,
R Ring  6.2 0.1612903226 9ol.
R Pinky 6.1 0.1639344262 0p;'

Typing different letter on same finger:
L Pinky 4.6 0.2173913043
L Ring  4.6 0.2173913043
L Mid   4.5 0.2222222222
L Index 5.3 0.1886792453
R Index 5.4 0.1851851852
R Mid   5.1 0.1960784314
R Ring  5.2 0.1923076923
R Pinky 5.2 0.1923076923

Same data in CSV format.
It  takes
.75 * (first_finger_same_letter_time + second_finger_same_letter_time) / 2

time to switch between two fingers.
Challenge
Given a string as input, how long does it take to type it?

The "timer" starts the moment the first key is pressed and ends when the last key is pressed. You are just counting the time between keypresses.
This is code-golf. Shortest answer in bytes wins.
Submission can be either a complete program or function.
Input and output any way you want it, stdin/out, function params, file, doesn't matter.
Output should be accurate to at least 3 decimal places (+/- 0.001 for rounding error is fine). Leading 0. for numbers under 1 and trailing newline optional.
Input will be a string that contains (lowercase) a-z, 0-9, space, semicolon, comma, period, and apostrophe.
I always type spaces with my right thumb.
I use the normal touch typing fingers (you can also look at the above table for finger-key mappings).
Reference code used to generate test cases

Test cases
(empty string or any one-character string) - 0.000
aa - 0.192
fff - 0.364
fj - 0.123
the quick brown fox jumped over the lazy dog - 5.795
yellowwooddoor - 1.983
orangewooddoor - 1.841
jump on it, jump on it - 2.748
type on it, type on it - 2.549
abcdefghijklmnopqrstuvwxyz01234567890 ;,.' - 5.746
ok, this may not be the most accurate but it's in the ballpark, maybe within 30 percent or so. - 12.138

Can we assume the input will be at least 2 character, or do we need to output 0 if the input is empty or a single character?

There are already a few answers that do handle it, so not going to change the rules halfway through

A new type of code golf: Instead of scoring answers based on byte count, the winner is whoever can type their program the fastest.

JavaScript (Node.js), 180 bytes
s=>(B=Buffer)(s).map(p=c=>(b='23841410645532207643205431765001333746443'[c*45%91%73%41]*2,t+=1/p?p-b?3/8*(g(b)+g(p)):g(b|c!=s):0,p=b,s=c),t=0,g=x=>10/B('4.2.5-75E6?3>4=4AA')[x])&&t

Try it online!
How?
Storing delays
The helper function \$g\$ takes an integer \$0\le x \le17\$ and returns a delay in seconds.
g = x => 10 / Buffer('4.2.5-75E6?3>4=4AA')[x]

The input \$x\$ is expected to be either:

twice the bin number to get the delay for the same letter
twice the bin number + 1 to get the delay for different letters

What is actually stored in the string '4.2.5-75E6?3>4=4AA' is the number of keystrokes per second multiplied by \$10\$ and converted to ASCII. Conveniently, all resulting characters are printable.
For instance, \$5.2\$ is stored as chr(52) which is '4'.
Converting a character to a key bin
We use the following hash function to convert an ASCII code \$c\$ to an index into a lookup table containing the bin numbers in \$[0..8]\$:
$$i = (((c\times 45) \bmod 91)\bmod 73)\bmod 41$$
Main loop
The total time \$t\$ is updated with:
t +=                        // add to t:
  1 / p ?                   //   if p is numeric:
    p - b ?                 //     if p is not equal to b:
      3 / 8 * (g(b) + g(p)) //       0.75 * (g(b) + g(p)) / 2
    :                       //     else:
      g(b | c != s)         //       g(b) if c == s or g(b + 1) otherwise
  :                         //   else (first iteration):
    0                       //     leave t unchanged

where \$p\$ is the previous bin and \$s\$ is the previous character.

Jelly, 78 bytes
“bk¶ŀqṣṁq*E’b25+45s2
Øq;"““;“,.'”Zṙ-ØD;"s2ẎW$€3,4¦ẎœiⱮQḢ€ị¢QƑịZƊQ3.75⁵Ḋ?÷$SµƝS

Try it online!
How?
“...’b25+45s2 - Link 1, keystrokes per 10 seconds: no arguments
“...’         - base 250 integer = 379310849477441257135820
     b25      - to base 25 = [16,7,7,1,5,1,8,0,10,8,24,9,18,6,17,7,20]
        +45   - add 45 = [61,52,52,46,50,46,53,45,55,53,69,54,63,51,62,52,65]
           s2 - split into twos
              - = [[61,52],[52,46],[50,46],[53,45],[55,53],[69,54],[63,51],[62,52],[65]]
             - For: 0...    1...    2...    3...    4...    6...    8...    9...    space

Øq;"““;“,.'”Zṙ-ØD;"s2ẎW$€3,4¦ẎœiⱮQḢ€ị¢QƑịZƊQ3.75⁵Ḋ?÷$SµƝS - Main Link: list of characters
                                                      µƝ  - for each neighbouring pair:
Øq                                                        -   qwerty = ["qwertyuiop","asdfghjkl","zxcvbnm"]
    ““;“,.'”                                              -   list of lists = ["",";",",.'"]
   "                                                      -   zip with:
  ;                                                       -     concatenate = ["qwertyuiop","asdfghjkl;","zxcvbnm,.'"]
            Z                                             -   transpose = ["qaz","wsx","edc","rfv","tgb","yhn","ujm","ik,","ol.","p;'"]
             ṙ-                                           -   rotate left -1 = ["p;'","qaz","wsx","edc","rfv","tgb","yhn","ujm","ik,","ol."]
               ØD                                         -   digits = "0123456789"
                  "                                       -   zip with:
                 ;                                        -     concatenate = ["0p;'","1qaz","2wsx","3edc","4rfv","5tgb","6yhn","7ujm","8ik,","9ol."]
                   s2                                     -   split into twos = [["0p;'","1qaz"],["2wsx","3edc"],["4rfv","5tgb"],["6yhn","7ujm"],["8ik,","9ol."]]
                            ¦                             -   sparse application...
                         3,4                              -   ...to indices: [3,4]
                       $€                                 -   ...do: last two links as a monad for each:
                     Ẏ                                    -     tighten
                      W                                   -     wrap in a list = [["0p;'","1qaz"],["2wsx","3edc"],["4rfv5tgb"],["6yhn7ujm"],["8ik,","9ol."]]
                             Ẏ                            -   tighten = ["0p;'","1qaz","2wsx","3edc","4rfv5tgb","6yhn7ujm","8ik,","9ol."]
                                 Q                        -   de-duplicate (the neighbouring letters)
                                Ɱ                         -   map with:
                              œi                          -     multi-dimensional index-into    e.g. "fj" -> [[5,3],[6,7]]
                                                          -     (note <space> is not there so yields an empty list)
                                  Ḣ€                      -   head of each                                -> [5,6]
                                                          -     (...and the head of an empty list is 0)
                                     ¢                    -   call the last Link (1) as a nilad
                                    ị                     -   index-into                                  -> [[55,53],[69,54]]
                                                          -     (...and 0 indexes into the rightmost entry)
                                          Ɗ               -   last three links as a monad:
                                       Ƒ                  -     invariant under?:
                                      Q                   -       de-duplicate (1 if so, else 0)
                                         Z                -       transpose                               -> [[55,69],[53,54]]
                                        ị                 -       index-into                              -> [55,69]
                                           Q              -   de-duplicate                                -> [55,69]
                                                    $     -   last two links as a monad:
                                                  ?       -     if...
                                                 Ḋ        -     ...condition: dequeue
                                            3.75          -     ...then: 3.75
                                                ⁵         -     ...else: 10                               -> 3.75
                                                   ÷      -     divide                                    -> [0.06818181818181818,0.05434782608695652]
                                                     S    -   sum                                         -> 0.12252964426877469
                                                        S - sum

05AB1E, 92 86 bytes
Îü)v•δ'ā∍ë*8U¾Ã•₂в45+2ô9ÝÀžV€Sζ‚ø˜ð",.;'"S.;ykD4/ïD3›-D4›-‚©θè®€ËOUεXè}T/zX_iO3*8/ëθ]O

Try it online or verify all test cases.
Explanation:
Î                     # Push 0 and the input-string
 ü)                   # Create all pairs of the (implicit) input-string
                      # (which will be [] if the input-string is of length 0 or 1)
                      #  i.e. "ab d" → ["a","b"],["b"," "],[" ","d"]]
   v                  # Loop over these pairs `y`:
    •δ'ā∍ë*8U¾Ã•     '#  Push compressed integer 307264255556527588774514
      ₂в              #  Converted to Base-26 as list: [7,1,5,1,8,0,10,8,24,9,18,6,17,7,16,7,20]
        45+           #  Add 45 to each: [52,46,50,46,53,45,55,53,69,54,63,51,62,52,61,52,65]
           2ô         #  Split into parts of size 2: [[52,46],[50,46],[53,45],[55,53],[69,54],[63,51],[62,52],[61,52],[65]]
    9Ý                #  Push list [0,1,2,3,4,5,6,7,8,9]
      À               #  Rotate it once to [1,2,3,4,5,6,7,8,9,0]
       žV             #  Push builtin ["qwertyuiop","asdfghjkl","zxcvbnm"]
         €S           #  Convert each to a list of characters
           ζ          #  Zip/transpose; swapping rows/columns, with space as default filler:
                      #   [["q","a","z"],["w","s","x"],["e","d","c"],["r","f","v"],["t","g","b"],["y","h","n"],["u","j","m"],["i","k"," "],["o","l"," "],["p"," "," "]]
            ‚ø        #  Pair it with the digit list, and zip/transpose again
              ˜       #  Then flatten this entire list:
                      #   ["1","q","a","z","2","w","s","x","3","e","d","c","4","r","f","v","5","t","g","b","6","y","h","n","7","u","j","m","8","i","k"," ","9","o","l"," ","0","p"," "," "]
               ð",.;'"S.;
                      #  Replace the four spaces with [",", ".", ";", "'"] in order
     yk               #  Get the indices of the characters in the pair `y` in this list
                      #   i.e. ["b"," "] → [19,-1]
        4/            #  Divide both by 4
                      #   i.e. [19,-1] → [4.75,-0.25]
          ï           #  Floor the decimals to integers
                      #   i.e. [4.75,-0.25] → [4,-1]
           D3›-       #  If an index is larger than 3: decrease it by 1
                      #   i.e. [4,-1] → [3,-1]
               D4›-   #  If an index is now larger than 4: decrease it by 1 again
       D           ‚  #  Pair it with the original index
                      #   i.e. [[19,-1],[3,-1]]
                    © #  And save it in the register (without popping)
     θè               #  Then use the last of the two to index into the list of pairs
                      #   i.e. [3,-1] → [[55,53],[65]]
       ®€Ë            #  Check for each pair in the register if they're equal
                      #   i.e. [[19,-1],[3,-1]] → [0,0]
          O           #  Take the sum of that
           U          #  And pop and store it in variable `X`
            ε  }      #  Map the pairs in the list to:
             Xè       #   The `X`'th value in the pair
                      #    i.e. [[55,53],[65]] and `X`=0 → [55,65]
     T/               #  Divide each by 10
                      #   i.e. [55,65] → [5.5,6.5]
       z              #  And take 1/value for each
                      #  i.e. [5.5,6.5] → [0.181...,0.153...]
        X_i           #  If variable `X` was 0:
           O          #   Take the sum of these decimal values
                      #    i.e. [0.181...,0.153...] → 0.335...
            3*8/      #   Multiply it by 3, and then divide it by 8
                      #    i.e. 0.335... → 0.125...
          ë           #  Else:
           θ          #   Pop the pair of decimal values, and only leave the last one
   ]                  # Close both the if-else statement and the loop
    O                 # And take the sum of the stack
                      # (which is output implicitly as result)

See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand why •δ'ā∍ë*8U¾Ã• is 307264255556527588774514 and •δ'ā∍ë*8U¾Ã•₂в is [7,1,5,1,8,0,10,8,24,9,18,6,17,7,16,7,20].


text:
Simulate Bitwise Cyclic Tag
Challenge
Given two strings in any default I/O format, do the following:
NOTE: The challenge will refer to the first string as the "data" and the second referred to as the "program".

Change the program to an infinite string which is just the program repeated infinitely (e.g. 10 --> 1010101010...). The challenge will refer to this as the "infinite program"
While the data is non-empty, do the following while looping over the infinite program:
a. If the current command is "0", delete the left-most bit in the data. If the data is empty, "0" does not do anything.
b. If the current command is "1", append the next character in the program to the data if the left-most bit in the data is a one.
c. If the data is not empty now, output the data.

Test Cases
Data is the left side of the input and the program is the right side.
100, 0 --> 00, 0
1111, 1 --> 11111, 111111, 1111111, ...
10, 011 --> 0, 0, 0
1110, 011 --> 110, 1101, 11010, 1010...

Notes

The data and program will consist of only 0s and 1s
For data/programs that do not halt, your program does not need to halt.
The data and program will not be empty in the input.
You may have multiple trailing and leading newlines
Standard Loopholes are forbidden
You can use any convenient I/O format

As always with code-golf, shortest code wins!

@Sanchises Seems like a borderline duplicate to that, but you have to get the result at a certain generation and that is for any cyclic tag system.

in the first test case, 100 goes to 10 on cmd 0, whose definition is "delete the left-most bit in the data."  wouldn't the leftmost bit of 100 be 1?

@Jonah Oh, missed that

in case (b), if you do the append, does the instruction pointer move right one or two characters?

@Sparr It moves right one. See the section labeled Challenge.

Your example submission produces a different result on the last test cast than what you have listed above in the post.  Your example program's output matches my program's output, so I expect the flaw is in the test case

@Jonah Sorry, forgot that one too. I keep on forgetting that 0 removes the left-most data bit, not the right-most one

I read "You can use any convenient I/O format" and used lists of zeroes and ones.  I'm noticing now that "any convenient format" conflicts with the "Given two strings" requirement.  I've already submitted my answer, but you may want to clarify this for others.

@Jonah I can't come up with a way to rephrase the question, can you help?

I would just say "Given two strings, two lists of booleans, or other equivalent format, ..." in the first sentence.

Are we allowed to have multiple trailing newlines?

@EmbodimentofIgnorance Yes

@Jonah technically in math a string is just a list of symbols :P so a list of anything is a string :P

@MilkyWay90 "see the section labeled Challenge" is not a great response when I am asking a question specifically already referring to that same section.

@Sparr Oh yeah, didn't notice that. Sorry!

Haskell, 77 71 62 bytes
f@(d:e)#(p:q)=f:[e,f++take d q]!!p#q
_#_=[]
a!b=tail$a#cycle b

Try it online!
Edit: -9 bytes thanks to @xnor.

In the first line, you can do f:[e,f++take d q]!!p#q.

C# (Visual C# Interactive Compiler), 82 bytes
m=>n=>{for(int i=0;m!="";Print(m=n[i++]<49?m.Substring(1):m[0]>48?m+n[i]:m))n+=n;}

Try it online!

what are the significance of the 48 and 49, out of curiosity?

@Jonah 48 is the ASCII value of 0, and 49 is the ASCII value of 1

shouldn't you use 0 and 1 instead here :P

@ASCII-only I'm using a string, not an array.

@EmbodimentofIgnorance why not use a List and Skip, or something like that

@ASCII-only Then I would have to add a check for when the list was empty, with m.Count>1, then I would have to transform m+n[i] into m.Append(n[i])

05AB1E, 24 21 bytes
[¹Nèi¬i¹N>è«}ë¦}DõQ#=

Takes the program as first input and data as second input.input.
Try it online.
Explanation:
[             # Start an infinite loop:
 ¹Nè          #  Get the N'th digit of the first (program) input
              #  (NOTES: N is the index of the infinite loop;
              #          indexing in 05AB1E automatically wraps around)
    i         #  If this digit is 1:
     ¬        #   Push the head of the current data (without popping it)
              #   (will take the second (data) input implicitly if it's the first iteration)
      i     } #   If this head is 1:
       ¹N>è   #    Get the (N+1)'th digit of the first (program) input
           «  #    And append it to the current data
    ë }       #  Else (the digit is a 0 instead):
     ¦        #   Remove the first digit from the current data
              #   (will take the second input (data) implicitly if it's the first iteration)
 DõQ          #  If the current data is an empty string:
    #         #   Stop the infinite loop
 =            #  Print the current data with trailing newline (without popping it)

Ruby, 62 59 bytes
->c,d{p(d)while(a,*c=c;b,*d=d;c<<a;[]!=d=[b]*a+d+c[0,a*b])}

Try it online!
How

Get the first bit from code c and data d, call them a and b. Put a back at the end of c.
Put back b at the beginning of d if a==1. This can be shortened to [b]*a
Put the first byte of c at the end of d if a==1 and b==1. This can be shortened to c[0,a*b].
If we have more data, print and repeat.

J, 65 bytes
(([:(][echo)(}.@[)`([,{.@[#1{],])@.({.@]));1|.])&>/^:(0<0#@{>)^:5

Try it online!
I may golf this further later.  Note the 5 at the end would be infinity _ in the actual program, but I've left it there to make running the non-halting examples easier.

Python 3, 74 bytes
def f(d,p):
 while d:c,*p=p+p[:1];d=(d[1:],d+p[:1]*d[0])[c];d and print(d)

Try it online!
Arguments: d: data, p: program.

C++ (gcc), 178 bytes
void a(std::string s,std::string d){while(!s.empty())for(int i=0;i<d.size();i++){if(d[i]=='0')s.erase(0,1);else if(s[0]=='1')s.push_back(d[(i+1)>=d.size()?0:i+1]);std::cout<<s;}}

Try it online!

163 bytes

Python 1, 75 bytes
a,b=input()
while a:b=b[1:]+b[:1];a=[a[1:],a+b[:1]*a[0]][b[0]];print a or''

Try it online!

Nice! A niggle: for data '100', program '0', this will print the empty string once: but rule c says "If the data is not empty now, output the data."

@ChasBrown Small typo, I'm waiting for clarification from the OP if trailing newlines are ok

@ChasBrown The OP says multiple trailing newlines are allowed, see here

But after switching to arrays of 1's and 0s, now you're printing an empty array  [] instead of a newline on e.g., data [1,0,0] , program [0].

python 1? python 2 doesn't work?

@ASCII-only It is obvious that Python 1 is superior to Python 2

Python 2, 96 82 bytes
def g(d,p):
 while d:
	c=p[0];p=p[1:]+[c];d=[d[1:],d+[p[0]]*d[0]][c]
	if d:yield d

Try it online!
Stealing a bit from Emodiment of Ignorance's answer...
A generator which uses lists of 1's and 0's for input / output.

Jelly, 40 bytes
;€Ø2œịxØ1œị$Ʋ$Ḋ€2,1œị$?1¦ṙ€1$2¦µ⁺1ịGṄƲ¿Ḣ

Try it online!
I’ve assumed trailing newlines are ok. I’ve also gone with a list of two lists of zeros and ones as input, and output to stdout.

C++ (gcc), 294 289 272 bytes
-22 bytes thanks to @ceilingcat
#import<cstdio>
#import<queue>
void a(char*e,char*p){std::queue<char>d;for(;*e;)d.push(*e++);for(char*c=p;d.size();c=*++c?c:p){*c-49?d.pop():d.front()-48?d.push(c[1]?c[1]:*p):a("","");if(d.size()){for(int i=0;i++<d.size();d.pop())d.push(putchar(d.front()));putchar(32);}}}

Try it online!
Fairly straightforward algorithm. Copies the data into a queue, and repeatedly loops through the program. On a "0", it removes the first element in the queue (the first "bit"). On a 1, it adds the next "bit" of the program to the data if the first "bit" of the data is 1. Then it loops through the data, printing it "bit" by "bit", and finally prints a space to separate successive data entries.

@ceilingcat Clever (ab)use of c[1]! Updated.

259 bytes

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Patience, young "Padovan"
Everyone knows the Fibonacci sequence:
You take a square, attach an equal square to it, then repeatedly attach a square whose side length is equal to the largest side length of the resulting rectangle.
The result is a beautiful spiral of squares whose sequence of numbers is the Fibonacci sequence:

But, what if we didn't want to use squares?
If we use equilateral triangles—instead of squares—in a similar fashion, we get an equally beautiful spiral of triangles and a new sequence:  the Padovan sequence, aka A000931:

Task:
Given a positive integer, \$N\$, output \$a_N\$, the \$N\$th term in the Padovan sequence OR the first \$N\$ terms.
Assume that the first three terms of the sequence are all \$1\$.  Thus, the sequence will start as follows:
$$
1,1,1,2,2,3,...
$$
Input:

Any positive integer \$N\ge0\$
Invalid input does not have to be taken into account

Output:

The \$N\$th term in the Padovan sequence OR the first \$N\$ terms of the Padovan sequence.
If the first \$N\$ terms are printed out, the output can be whatever is convenient (list/array, multi-line string, etc.)
Can be either \$0\$-indexed or \$1\$-indexed

Test Cases:
(0-indexed, \$N\$th term)
Input | Output
--------------
0     | 1
1     | 1
2     | 1
4     | 2
6     | 4
14    | 37
20    | 200
33    | 7739

(1-indexed, first \$N\$ terms)
Input | Output
--------------
1     | 1
3     | 1,1,1
4     | 1,1,1,2
7     | 1,1,1,2,2,3,4
10    | 1,1,1,2,2,3,4,5,7,9
12    | 1,1,1,2,2,3,4,5,7,9,12,16

Rules:

This is code-golf: the fewer bytes, the better!
Standard loopholes are forbidden.

14 (0-indexed) is shown as outputting 28 while I believe it should yield 37

@JonathanAllan yes, you are correct.  I fixed the last two test cases for $N$th term but not that one.  The post has been edited.

@LuisMendo I believe so.  I'll edit the post.

Not to detract from the question, but is this the actual definition of the Fibonacci sequence? I was taught it as a sequence of numbers, in which the first two numbers are 1, and the 3rd and subsequent numbers are the sum of the prior two numbers. Then again, I was taught this as an example of a problem to solve with recursion...

@sharur this definition for the Fibonacci sequence is the visual definition.  Each successive square added has a length of that term in the sequence.  The sequence you describe is the numerical reasoning behind it.  Both sequences work just as well as the other.

Note that the OEIS sequence you linked is slightly different, since it uses a_0=1, a_1=0, a_2=0. It ends up being shifted by a bit because then a_5=a_6=a_7=1

@Carmeister yes, that is correct.  The OEIS sequence is the true Padovan sequence, but I shifted it over to $a_0=a_1=a_2=1$ for convenience (plus most mentions I've seen of this sequence start it at the aforementioned shift).

Questions in Code Golf that result in answers under 10 bytes should automatically get a hat or something.  Yet again the compact answers were mind boggling and it is hard to think that this question was not considered when the languages were developed.

Can we define the sequence as $1,0,1,1,1,2,2,3,...$ if that's the natural output from the algorithm used?

Can we take no input and output forever?

Jelly, 10 bytes
9s3’Ẓæ*³FṀ

Try it online!
1-indexed. Computes the largest element of: $$\begin{bmatrix}0&0&1 \\ 1&0&1 \\ 0&1&0\end{bmatrix}^n$$
where the binary matrix is conveniently computed as: $$\begin{bmatrix}\mathsf{isprime}(0)&\mathsf{isprime}(1)&\mathsf{isprime}(2) \\ \mathsf{isprime}(3)&\mathsf{isprime}(4)&\mathsf{isprime}(5) \\ \mathsf{isprime}(6)&\mathsf{isprime}(7)&\mathsf{isprime}(8)\end{bmatrix}$$
(this is a total coincidence.)
9s3         [[1,2,3],[4,5,6],[7,8,9]]    9 split 3
   ’        [[0,1,2],[3,4,5],[6,7,8]]    decrease
    Ẓ       [[0,0,1],[1,0,1],[0,1,0]]    isprime
     æ*³    [[0,0,1],[1,0,1],[0,1,0]]^n  matrix power by input
        FṀ                               flatten, maximum

this is clearly some kind of voodoo

This should be published.

@YSC It has already been published in A000931. I'd never have guess the primes trick:)

@flawr ho... I missed it

Funnily enough I saw this method on the OEIS page and thought there was no way it would be less than my 10 byte binomial sum method (turns out that guess was right, unless someone can golf a byte off this one!)

...make that "unless someone can golf two bytes off this one" :) (now that I have a 9 byter)

I'm so used to seeing absurdly small answers here, that I thought the comma after 'Jelly' was in fact the code for this problem

@Pureferret The fact that the entries coincide with "isprime" is a coincidence, but using matrix powers to compute linear recurrence relations is a classical way to solve them.

Jelly,  10 9  8 bytes
ŻṚm2Jc$S

A monadic Link accepting n (0-indexed) which yields P(n).
Try it online!
How?
Implements \$P(n) = \sum_{i=0}^{\lfloor\frac{n}2\rfloor}\binom{i+1}{n-2i}\$
ŻṚm2Jc$S - Link: integer, n       e.g. 20
Ż        - zero range                  [0, 1, 2, 3, 4, ..., 19, 20]
 Ṛ       - reverse                     [20, 19, ..., 4, 3, 2, 1, 0]
  m2     - modulo-slice with 2         [20, 18, 16, 14, 12, 10,  8,  6,  4,  2,  0]  <- n-2i
      $  - last two links as a monad:
    J    -   range of length           [ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11]  <- i+1
     c   -   left-choose-right         [ 0,  0,  0,  0,  0,  0,  0, 28,126, 45,  1]
       S - sum                         200

And here is a "twofer"
...a totally different method also for 8 bytes (this one is 1-indexed, but much slower):
3ḊṗRẎ§ċ‘ - Link: n
3Ḋ       - 3 dequeued = [2,3]
   R     - range = [1,2,3,...,n]
  ṗ      -   Cartesian power         [[[2],[3]],[[2,2],[2,3],[3,2],[3,3]],[[2,2,2],...],...]
    Ẏ    - tighten                   [[2],[3],[2,2],[2,3],[3,2],[3,3],[2,2,2],...]
     §   - sums                      [ 2,  3,   4,    5,    5,    6,     6,...]
       ‘ - increment                 n+1
      ċ  - count occurrences         P(n)

Oasis, 5 bytes
nth term 0-indexed
cd+1V

Try it online!
Explanation
   1V   # a(0) = 1
        # a(1) = 1
        # a(2) = 1
        # a(n) =
c       #        a(n-2)
  +     #              +
 d      #               a(n-3)

Haskell, 26 bytes
(l!!)
l=1:1:1:2:scanl(+)2l

Try it online! Outputs the n'th term zero-indexed.
I thought that the "obvious" recursive solution below would be unbeatable, but then I found this. It's similar to the classic golfy expression l=1:scanl(+)1l for the infinite Fibonacci list, but here the difference between adjacent elements is the term 4 positions back. We can more directly write l=1:1:zipWith(+)l(0:l), but that's longer.
If this challenge allowed infinite list output, we could cut the first line and have 20 bytes.
27 bytes
f n|n<3=1|1>0=f(n-2)+f(n-3)

Try it online!

Python 2, 30 bytes
f=lambda n:n<3or f(n-2)+f(n-3)

Try it online!
Returns the n'th term zero indexed. Outputs True for 1.

Wolfram Language (Mathematica), 33 bytes
a@0=a@1=a@2=1;a@n_:=a[n-2]+a[n-3]

1-indexed, returns the nth term
Try it online!

Octave / MATLAB, 35 33 bytes
@(n)[1 filter(1,'cbaa'-98,2:n<5)]

Outputs the first n terms.
Try it online!
How it works
Anonymous function that implements a recursive filter.
'cbaa'-98 is a shorter form to produce [1 0 -1 -1].
2:n<5 is a shorter form to produce [1 1 1 0 0 ··· 0] (n−1 terms).
filter(1,[1 0 -1 -1],[1 1 1 0 0 ··· 0]) passes the input [1 1 1 0 0 ··· 0] through a discrete-time filter defined by a transfer function with numerator coefficient 1 and denominator coefficients [1 0 -1 -1].

J, 22 bytes
-2 bytes thanks to ngn and Galen
closed form, 26 bytes
0.5<.@+1.04535%~1.32472^<:

Try it online!
iterative, 22 bytes
(],1#._2 _3{ ::1])^:[#

Try it online!

Another 24-byte solution (boring) : (1#.2 3$:@-~])`1:@.(3&>) Try it online!

23 bytes thanks to ngn 1: -> # : Try it online!

@GalenIvanov tyvm, that's a great trick.

1: -> 1. "adverse" works with a noun on the right, apparently

@ngn TIL... ty again!

Retina, 47 42 bytes
K`0¶1¶0
"$+"+`.+¶(.+)¶.+$
$&¶$.(*_$1*
6,G`

Try it online! Outputs the first n terms on separate lines. Explanation:
K`0¶1¶0

Replace the input with the terms for -2, -1 and 0.
"$+"+`.+¶(.+)¶.+$
$&¶$.(*_$1*

Generate the next n terms using the recurrence relation. *_ here is short for $&*_ which converts the (first) number in the match to unary, while $1* is short for $1*_ which converts the middle number to unary. The $.( returns the decimal sum of its unary arguments, i.e. the sum of the first and middle numbers.
6,G`

Discard the first six characters, i.e. the first three lines.

Perl 6, 24 bytes
{(1,1,1,*+*+!*...*)[$_]}

Try it online!
A pretty standard generated sequence, with each new element generated by the expression * + * + !*.  That adds the third-previous element, the second-previous element, and the logical negation of the previous element, which is always False, which is numerically zero.

Why is this community wiki?

@JoKing Beats me.  If I did it somehow, it wasn't on purpose.

Note that using … in place of ... doesn't change the UTF-8 length in bytes, but with a Perl 6 specific SBCS it would be 22 bytes: Try it online!

Cubix, 20 bytes
This is 0 indexed and outputs the Nth term
;@UOI010+p?/sqq;W.\(

Try it online!
Wraps onto a cube with side length 2
    ; @
    U O
I 0 1 0 + p ? /
s q q ; W . \ (
    . .
    . .

Watch it run

I010 - Initiates the stack
+p? - Adds the top of stack, pulls the counter from the bottom of stack and tests
/;UO@ - If counter is 0, reflect onto top face, remove TOS, u-turn, output and halt
\(sqq;W - If counter is positive, reflect, decrement counter, swap TOS, push top to bottom twice, remove TOS and shift lane back into the main loop.

APL (Dyalog Unicode), 20 18 17 bytesSBCS
This code is 1-indexed. It's the same number of bytes to get n items of the Padovan sequence, as you have to drop the last few extra members. It's also the same number of bytes to get 0-indexing.
Edit: -2 bytes thanks to ngn. -1 byte thanks to ngn
4⌷2(⊢,⍨2⌷+/)⍣⎕×⍳3

Try it online!
Explanation
4⌷2(⊢,⍨2⌷+/)⍣⎕×⍳3

  ⍺(. . . .)⍣⎕⍵   This format simply takes the input ⎕ and applies the function
                   inside the brackets (...) to its operands (here marked ⍵ and ⍺).
  2(. . .+/)⍣⎕×⍳3  In this case, our ⍵, the left argument, is the array 1 1 1,
                   where we save our results as the function is repeatedly applied
                   and our ⍺, 2, is our right argument and is immediately applied to +/,
                   so that we have 2+/ which will return the pairwise sums of our array.
       2⌷          We take the second pairwise sum, f(n-2) + f(n-3)
    ⊢,⍨            And add it to the head of our array.
4⌷                 When we've finished adding Padovan numbers to the end of our list,
                   the n-th Padovan number (1-indexed) is the 4th member of that list,
                   and so, we implicitly return that.

Python 2, 56 48 bytes
f=lambda n,a=1,b=1,c=1:n>2and f(n-1,b,c,a+b)or c

Try it online!
Returns nth value, 0-indexed.

05AB1E, 7 bytes
Thanks to Kevin for -1 byte!
Ì1λè₂₃+

Try it online!
Previous version: 05AB1E, 8 bytes
1Ð)λ£₂₃+

Try it online!
Bear with me, I haven't golfed in a while. I wonder if there's a shorter substitute for 1Ð) which works in this case (I've tried 1D), 3Å1 etc. but none of them save bytes). Outputs the first \$n\$ terms of the sequence. Or, without the £, it would output an infinite stream of the terms of the sequence.
1Ð)λ£₂₃+ | Full program.
1Ð)      | Initialize the stack with [1, 1, 1].
   λ     | Begin the recursive generation of a list: Starting from some base case,
         | this command generates an infinite list with the pattern function given.
    £    | Flag for λ. Instead of outputting an infinite stream, only print the first n.
     ₂₃+ | Add a(n-2) and a(n-3).

I don't think 1Ð) can be 2 bytes tbh. I can think of six different 3-bytes alternatives, but no 2-byters.

@KevinCruijssen That's 5 alternatives btw (the first is still 1Ð)). Also: 7bS, 7Yв, X3и

₁SĀ works too

7 bytes by outputting the 0-based $n^{th}$ value instead of first $n$.

K (ngn/k), 24 20 bytes
-4 bytes thanks to ngn!
{$[x<3;1;+/o'x-2 3]}

Try it online!
0-indexed, first N terms

f[x-2]+f[x-3] -> +/o'x-2 3 (o is "recur")

@ngn Thanks! I tried it (without success) in J; it's elegant here.

@ngn In fact here's one possibillity how it looks in J: (1#.2 3$:@-~])`1:@.(3&>)

ah, right, base-1 decode is a train-friendly way to sum :)

1: -> # in the j solution

@ngn # is a nice golf! Now it's 23 bytes and beats Jonah's J solution :)

Boo! :)  @ngn thanks for that # trick

x86 32-bit machine code, 17 bytes
53 33 db f7 e3 43 83 c1 04 03 d8 93 92 e2 fa 5b c3

Disassembly:
00CE1250 53                   push        ebx
00CE1251 33 DB                xor         ebx,ebx
00CE1253 F7 E3                mul         eax,ebx
00CE1255 43                   inc         ebx
00CE1256 83 C1 04             add         ecx,4
00CE1259 03 D8                add         ebx,eax
00CE125B 93                   xchg        eax,ebx
00CE125C 92                   xchg        eax,edx
00CE125D E2 FA                loop        myloop (0CE1259h)
00CE125F 5B                   pop         ebx
00CE1260 C3                   ret

It is 0-indexed. The initialization is conveniently achieved by calculating eax * 0. The 128-bit result is 0, and it goes in edx:eax.
At the beginning of each iteration, the order of the registers is ebx, eax, edx. I had to choose the right order to take advantage of the encoding for the xchg eax instruction - 1 byte.
I had to add 4 to the loop counter in order to let the output reach eax, which holds the function's return value in the fastcall convention.
I could use some other calling convention, which doesn't require saving and restoring ebx, but fastcall is fun anyway :)

I love to see machine code answers on PP&CG!  +1

15 bytes, 1 indexed

Jelly, 11 bytes
5B+Ɲ2ị;Ʋ⁸¡Ḣ

Try it online!
0-indexed.

JavaScript (ES6), 23 bytes
Implements the recursive definition of A000931, but with \$a(0)=a(1)=a(2)=1\$, as specified in the challenge.
Returns the \$N\$th term, 0-indexed.
f=n=>n<3||f(n-2)+f(n-3)

Try it online!

I don't think it's reasonable to say that returning true is the same as returning 1 if the rest of the output is numbers.

@Nit Relevant meta post.

I think you are missing some requirements:
Have a look at my modification (version in Java) here.

@Shaq The challenge clearly specifies that the first three terms of the sequence are all 1. So, it's not the sequence defined in A000931 (but the formula is the same).

@Arnauld yep I can see it now. Sorry!

With 24 votes against 16 + 4 votes, looks like the community has accepted true as valid here. But if you don't like that, you can make the first three terms explicitly 1 by adding an extra byte: f=x=>x<3?1:f(x-2)+f(x-3)

Lua 5.3, 49 48 bytes
function f(n)return n<4 and 1or f(n-2)+f(n-3)end

Try it online!
Vanilla Lua doesn't have coercion of booleans to strings (even tonumber(true) returns nil), so you have to use a pseudo-ternary operator. This version is 1-indexed, like all of Lua. The 1or part has to be changed to 1 or in Lua 5.1, which has a different way of lexing numbers.

Ruby, 26 bytes
f=->n{n<3?1:f[n-2]+f[n-3]}

Try it online!

Japt -N, 12 bytes
<3ªßUµ2 +ß´U

Try it

Looks like 12 is the best we can do :\

I stand corrected!

Japt, 12 9 bytes
Returns the nth term, 1-indexed.
@1gZÔä+}g

Try it
@1gZÔä+}g     :Implicit input of integer U
        g     :Starting with the array [0,1] do the following U times, pushing the result to the array each time
@             :  Pass the array through the following function as Z
 1g           :    Get the element at 0-based index 1, with wrapping, from the following
   ZÔ         :    Reverse Z
     ä+       :    Get the sums of each consecutive pair of elements
       }      :  End function
              :Implicit output of the last element in the array

TI-BASIC (TI-84), 34 bytes
[[0,1,0][0,0,1][1,1,0]]^(Ans+5:Ans(1,1

0-indexed \$N\$th term of the sequence.
Input is in Ans.
Output is in Ans and is automatically printed out.
I figured that enough time had passed, plus multiple answers had been posted, of which there were many which out-golfed this answer.
Example:
0
               0
prgmCDGFD
               1
9
               9
prgmCDGFD
               9
16
              16
prgmCDGFD
              65

Explanation:
[[0,1,0][0,0,1][1,1,0]]^(Ans+5:Ans(1,1      ;full program (example input: 6)

[[0,1,0][0,0,1][1,1,0]]                     ;generate the following matrix:
                                            ; [0 1 0]
                                            ; [0 0 1]
                                            ; [1 1 0]
                       ^(Ans+5              ;then raise it to the power of: input + 5
                                            ; [4  7 5]
                                            ; [5  9 7]
                                            ; [7 12 9]
                               Ans(1,1      ;get the top-left index and leave it in "Ans"
                                            ;implicitly print Ans

Pyth, 16 bytes
L?<b3!b+y-b2y-b3

This defines the function y. Try it here!
Here's a more fun solution, though it's 9 bytes longer; bytes could be shaved though.
+l{sa.pMf.Am&>d2%d2T./QY!

This uses the definition given by David Callan on the OEIS page: "a(n) = number of compositions of n into parts that are odd and >= 3." Try it here! It takes input directly instead of defining a function.

y-b2y-b3 could maybe be refactored with either bifurcate or L? Though declaring an array of 2 elements is costly. yL-Lb2,3 is longer :(

@Ven I was able to replace +y-b2y-b3 with smy-bdhB2 which is the same amount of bytes; hB2 results in the array [2, 3]

Well done on hB2. Too bad it's the same byte count.

Yeah, though I wonder if there's some way to get rid of the d in the map.

Perl 5, 34 bytes
sub f{"@_"<3||f("@_"-2)+f("@_"-3)}

Try it online!

R + pryr, 38 36 bytes
Zero-indexed recursive function.
f=pryr::f(`if`(n<3,1,f(n-2)+f(n-3)))

Try it online!
Thanks to @Giuseppe for pointing out two obviously needless bytes.

If you're going to be using pryr, the language should be R + pryr and this can be 36 bytes

@Giuseppe thanks! Updated now.

Java, 41 bytes
Can't use a lambda (runtime error). Port of this Javascript answer
int f(int n){return n<3?1:f(n-2)+f(n-3);}

TIO

I think you are missing some requirements:
Have a look at my modification here.

Please disregard Shaq's comment: your answer is correct and is the shortest Java answer possible (as of Java 12).

Ok then. I'm not sure what I "missed" but ok.
Edit: nvm I read the JS answer.

05AB1E, 8 bytes
This implementation of the binomial formula: a(n) = Sum_{k=0..floor(n/2)} binomial(k+1, n-2k) is interestingly the same length as the recursive solution.
;Ý·-āscO

Try it online!
Explanation
;Ý        # push [0 ... floor(input/2)]
  ·       # double each
   -      # subtract each from input
    ā     # push range [1 ... len(list)]
     s    # swap
      c   # choose
       O  # sum

C (clang), 41 33 bytes
a(i){return i<3?1:a(i-2)+a(i-3);}

Try it online!

Welcome to PPCG :)

Husk, 9 8 bytes
↑ƒ(+ḋ7Ẋ+

Try it online!
There might be is a shorter version using fix. -1 from Leo!

There is https://tio.run/##yygtzv7//1HbxGOTNLQf7ug2f7irS/v///@GRgA

Perl 5, 38 36 bytes (full program)
-2 bytes thanks to dingledooper
By the challenge's specification, this is \$1\$-indexed:
1x<>.1~~/^(...?)*$(?{++$i})\1/;say$i

Try it online!
This uses the same trick as Fibonacci function or sequence, with the 1 byte modification of inserting an extra . in the regex, so that the number of ordered partitions as a sum of the numbers \$2\$ and \$3\$ is counted. For example, \$11\$ can be represented \$9\$ ways:
2+2+2+2+3
2+2+2+3+2
2+2+3+2+2
2+3+2+2+2
3+2+2+2+2
2+3+3+3
3+2+3+3
3+3+2+3
3+3+3+2

This tells us that the term at index \$11-1\$ (in the \$1\$-indexing requested by the challenge) is \$9\$.
In the form of a full program, Xcali's recursive answer is longer at 43 bytes:
sub f{"@_"<3||f("@_"-2)+f("@_"-3)}say f(<>)

Try it online!
But the most mathematically consistent indexing for the Padovan sequence would have it start with \$0,1,0,1,1,1,2,2,3...\$ at index \$0\$, based on the Fibonacci indexing in which \$0,1,1,2,3,5,8...\$ starts at index \$0\$. By this challenge's specification that would be “\$3\$-indexing”. The regex backtracking method golfs best with “\$2\$-indexing”, and the recursive method golfs best with “\$0\$-indexing”.
With “\$2\$-indexing” and higher, 1 0 bytes must be taken to coerce the return value into an integer, because the term at index \$1\$ is \$0\$, and ++$i would never get executed – which would leave it with a non-value if it were not initialized. This can be golfed by adding the boolean falsey return value of the regex match operator (which gets coerced to the integer 0) to $i, though Perl gives the runtime warning Use of uninitialized value $i in addition (+) if this happens with use warnings enabled.
Something similar happens with the “\$2\$-indexing” recursive version, requiring the use of a ^1 XOR which gives the warning Possible precedence problem on bitwise ^ operator with use warnings enabled.
“\$0\$-indexing”: 1x<>.11~~/^(...?)*$(?{++$i})\1/;say$i 37 bytes - Try it online!
“\$1\$-indexing”: 1x<>.1~~/^(...?)*$(?{++$i})\1/;say$i 36 bytes - Try it online!
“\$2\$-indexing”: $_=1x<>;say/^(...?)*$(?{++$i})\1/+$i 36 bytes - Try it online!
“\$3\$-indexing”: $_=1x<>;say/^.(...?)*$(?{++$i})\1/+$i 37 bytes - Try it online!
“\$0\$-indexing”: sub f{"@_"<3||f("@_"-2)+f("@_"-3)}say f(<>) 43 bytes - Try it online!
“\$1\$-indexing”: sub f{"@_"<3?pop>0:f("@_"-2)+f("@_"-3)}say f(<>) 48 bytes - Try it online!
“\$2\$-indexing”: sub f{"@_"<3?pop==1^1:f("@_"-2)+f("@_"-3)}say f(<>) 51 bytes - Try it online!
“\$3\$-indexing”: sub f{"@_"<3?1&pop:f("@_"-2)+f("@_"-3)}say f(<>) 48 bytes - Try it online!
Perl 5 -n, 43 42 40 bytes (full program with implied loop)
It is longer when required to be executed in a loop, due to the need to initialize $i each time, but this can be golfed to cost only 4 bytes:
1x$_.1~~/^(...?)*$(?{++$i})\1/;$i=!say$i

Try it online!
Alternative 40 bytes (doesn't work for “\$2\$-indexing” and higher):
1x$_.1~~/^(...?)*$(?{++$i})\1/;$i%=say$i

Try it online!
“\$0\$-indexing”: 1x$_.11~~/^(...?)*$(?{++$i})\1/;$i=!say$i 41 bytes - Try it online!
“\$1\$-indexing”: 1x$_.1~~/^(...?)*$(?{++$i})\1/;$i=!say$i 40 bytes - Try it online!
“\$2\$-indexing”: $i=0;1x$_~~/^(...?)*$(?{++$i})\1/;say$i 39 bytes - Try it online!
“\$3\$-indexing”: $i=0;1x$_~~/^.(...?)*$(?{++$i})\1/;say$i 40 bytes - Try it online!
“\$0\$-indexing”: sub f{"@_"<3||f("@_"-2)+f("@_"-3)}say f($_) 43 bytes - Try it online!
“\$1\$-indexing”: sub f{"@_"<3?pop>0:f("@_"-2)+f("@_"-3)}say f($_) 48 bytes - Try it online!
“\$2\$-indexing”: sub f{"@_"<3?pop==1^1:f("@_"-2)+f("@_"-3)}say f($_) 51 bytes - Try it online!
“\$3\$-indexing”: sub f{"@_"<3?1&pop:f("@_"-2)+f("@_"-3)}say f($_) 48 bytes - Try it online!
Perl 5 -pl, 43 42 40 bytes (full program with implied loop)
The initialization can be golfed in this form as well (but this doesn't work for “\$2\$-indexing” and higher):
1x$_.1~~/^(...?)*$(?{++$i})\1/;$i%=$_=$i

Try it online!
“\$0\$-indexing”: 1x$_.11~~/^(...?)*$(?{++$i})\1/;$i%=$_=$i 41 bytes - Try it online!
“\$1\$-indexing”: 1x$_.1~~/^(...?)*$(?{++$i})\1/;$i%=$_=$i 40 bytes - Try it online!
“\$2\$-indexing”: $i=0;1x$_~~/^(...?)*$(?{++$i})\1/;$_=$i 39 bytes - Try it online!
“\$3\$-indexing”: $i=0;1x$_~~/^.(...?)*$(?{++$i})\1/;$_=$i 40 bytes - Try it online!
“\$0\$-indexing”: sub f{"@_"<3||f("@_"-2)+f("@_"-3)}$_=f($_) 42 bytes - Try it online!
“\$1\$-indexing”: sub f{"@_"<3?pop>0:f("@_"-2)+f("@_"-3)}$_=f($_) 47 bytes - Try it online!
“\$2\$-indexing”: sub f{"@_"<3?pop==1^1:f("@_"-2)+f("@_"-3)}$_=f($_) 50 bytes - Try it online!
“\$3\$-indexing”: sub f{"@_"<3?1&pop:f("@_"-2)+f("@_"-3)}$_=f($_) 47 bytes - Try it online!
Perl 5, 47 45 bytes (anonymous function with no side effects)
sub{my$i;1x"@_".1~~/^(...?)*$(?{++$i})\1/;$i}

Try it online! - displays terms \$1\$ through \$46\$ with “\$1\$-indexing”
As a function already, Xcali's 34 byte answer is shorter, although significantly slower:
Try it online! - displays terms \$0\$ through \$45\$ with “\$0\$-indexing”
“\$0\$-indexing”: sub{my$i;1x(2+pop)~~/^(...?)*$(?{++$i})\1/;$i} 46 bytes - Try it online!
“\$1\$-indexing”: sub{my$i;1x"@_".1~~/^(...?)*$(?{++$i})\1/;$i} 45 bytes - Try it online!
“\$2\$-indexing”: sub{my$i;(1x pop)=~/^(...?)*$(?{++$i})\1/+$i} 45 bytes - Try it online!
“\$3\$-indexing”: sub{my$i;(1x pop)=~/^.(...?)*$(?{++$i})\1/+$i} 46 bytes - Try it online!
“\$0\$-indexing”: sub f{"@_"<3||f("@_"-2)+f("@_"-3)} 34 bytes - Try it online!
“\$1\$-indexing”: sub f{"@_"<3?pop>0:f("@_"-2)+f("@_"-3)} 39 bytes - Try it online!
“\$2\$-indexing”: sub f{"@_"<3?pop==1^1:f("@_"-2)+f("@_"-3)} 42 bytes - Try it online!
“\$3\$-indexing”: sub f{"@_"<3?1&pop:f("@_"-2)+f("@_"-3)} 39 bytes - Try it online!
Perl 6, 27 26 25 24 bytesSBCS (anonymous function)
{+m:ex/^(...?)*$/}o¹x*+2

Try it online!
Thanks to Jo King for extending the idea to this language.
“\$0\$-indexing”: {+m:ex/^(...?)*$/}o¹x*+2 24 bytes - Try it online!
“\$1\$-indexing”: {+m:ex/^(...?)*$/}o¹x*+1 24 bytes - Try it online!
“\$2\$-indexing”: {+m:ex/^(...?)*$/}o¹x* 22 bytes - Try it online!
“\$3\$-indexing”: {+m:ex/^.(...?)*$/}o¹x* 23 bytes - Try it online!
Sean's non-regex answer (shown below adapted to different indexings) is still shorter, but only by 2 bytes (though it's longer at “\$3\$-indexing” and ties at “\$2\$-indexing”). Fibonacci is not even close.
“\$0\$-indexing”: {(1,1,1,*+*+!*…*)[$_]} 22 bytes - Try it online!
“\$1\$-indexing”: {(0,1,1,*+*+!*…*)[$_]} 22 bytes - Try it online!
“\$2\$-indexing”: {(1,0,1,*+*+!*…*)[$_]} 22 bytes - Try it online!
“\$3\$-indexing”: {(0,1,~0,*+*+!*…*)[$_]} 23 bytes - Try it online!
“\$3\$-indexing”: {(0,1,0,*+*+*%1…*)[$_]} 23 bytes - Try it online!
“\$3\$-indexing”: {(0,1,0,*+*+*×0…*)[$_]} 23 bytes - Try it online!
Note that the same regex method used in the Perl 5 versions can also be directly ported to Perl 6:
“\$0\$-indexing”: {my$i;¹x$_+2~~/^(...?)*${++$i}./;$i} 36 bytes - Try it online!
“\$1\$-indexing”: {my$i;¹x$_+1~~/^(...?)*${++$i}./;$i} 36 bytes - Try it online!
“\$2\$-indexing”: {my$i;¹x$_~~/^(...?)*${++$i}./;+$i} 35 bytes - Try it online!
“\$3\$-indexing”: {my$i;¹x$_~~/^.(...?)*${++$i}./;+$i} 36 bytes - Try it online!

J, 14 bytes
(>:%1-*:*>:)t.

Try it online!
Asks for the (input)-th Taylor coefficient of the generating function $$x \mapsto \frac{x+1}{1-x^2\cdot(x+1)}.$$
(The parenthesized train >: % 1 - *: * >: is read as: “increment over one minus square times increment.”)

C# (Visual C# Interactive Compiler), 34 bytes
int f(int g)=>g<3?1:f(g-2)+f(g-3);

Try it online!

C++ (gcc), 81 75 74 bytes
-6 bytes to small golfing
-1 byte thanks to @ceilingcat
int a(int n){int a=1,b=1,c=1,d,i=2;for(;i++<n;c=d)d=a+b,a=b,b=c;return c;}

Try it online!
Simple function to compute the values iteratively. No loop occurs for n<3, so the first cases default to the initial 1.

Gaia, 16 14 12 bytes
7b@⟨ṇ;(++⟩ₓ(

Try it online!
0-based index. Only holds the last 3 values.
7b		| push [1 1 1]
  @		| push input
   ⟨     ⟩ₓ	| do the following that many times (0 times if 0 or less)
    ṇ		| pop the first element and leave the rest below
     ;		| copy from below
      (		| take the first element
       +	| add the two together
	+	| and concatenate to the list. End loop.
	   (	| finally, take the first element

Gaia, 14 bytes
ø@⟨18b+ₔ…Σ¦⟩ₓ<

Try it online!
Returns the first n elements, 1-based index. < could also be E to get just the nth element.
Uses the identity from the OEIS page \$a(n+5)=\sum\limits_{i=1}^n a(i)\$.
This is quite inefficient, as it repeatedly copies the first few lists.
ø		| push empty list
 @⟨	   ⟩ₓ	| do (input) number of times:
   18b		| push [1 0 0 1 0] by converting 18 to bits
      +ₔ	| append cumulative list (initially empty) to end of bits
	…Σ¦	| and calculate the cumulative sums, replacing old cumulative list
	     <	| finally, take the first (input) elements of cumulative sums

Wolfram Language (Mathematica), 26 bytes
If[#<3,1,#0[#-2]+#0[#-3]]&

Try it online!

Pari/GP, 28 bytes
0-indexed.
f(n)=if(n<3,1,f(n-2)+f(n-3))

Try it online!

Pari/GP, 35 bytes
1-indexed.
n->Vec((1+x+O(x^n))/(1-x^2-x^3))[n]

Try it online!
The generating function of the sequence is \$\frac{1+x}{1-x^2-x^3}\$.

dc, 50 48 bytes
 2+sx3si1d:a[liddddd3-;ar2-;a+r:a1+silx>M]dsMx;ap

It's 1-indexed! Try it online! Previous version!
Golfed off two bytes by only populating the first element in the array.
Probably can be golfed a bit more, but it's tricky because you have to a: seed the initial values, and b: use arrays since dc doesn't let you pick from arbitrary stack positions.
2+sx3si adds two to the user input at top of stack into register x, and starts an increment counter register i at 3. We have to add two because the array is now populated in such a way that it's 3-indexed.
1d:a populates element 1 of array a with a 1. The 50 byte version populated elements 1 and 2 with 1d2:a1:a. The mechanism works with just the single element populated, however, it just takes a little while to get enough 1s in place such as to start the sequence. Even though going from 1d2:a1:a to 1d:a saves 4 bytes, we now have to 2+ our input. Still two bytes saved. Initially, I thought I had to seed the first three elements with 1dd3:a2:a1:a (+4 bytes), but... dc returns a zero for any unassigned array element, and if we start macro M (below) by creating the third element, adding 0 to 1... we're good to go.
Macro M:
liddddd loads register i and makes a bunch of copies of it. We subtract 3 from one of these, get the corresponding element from a and then swap top of stack. Subtract 2, get the corresponding element from a, add the two elements to get our new value, then swap the top of stack. At this point, :a puts our new value into a at position i. 1+si to increment i, and lx>M to keep running M until we hit our target (stored in x). dsMx runs M, and once M has finished running, the stack should be full of leftover i values, the topmost of which is the last one we made. Load the value from a with ;a and print it with p.

Brain-Flak, 96 bytes
(()()()){({}[()]<{({}[()])<>(())(<>)}{}>)}{}{({}[()]<<>({}<(({}(({}))<>)<>[{}])>)<>({}<>)<>>)}<>

Try it online!

Clojure, 46 bytes
(defn f[n](if(< n 3)1(+(f(- n 2))(f(- n 3)))))

Just for completeness sake :)
Try it online!

Welcome to PPCG :)

CJam, 16 bytes
qi7Yb{((_j\(j+}j

0-indexed, returns nth item
Try it online!
Explanation: It uses a recursive function to add a(n-2) to a(n-3) to find a(n).
qi7Yb{((_j\(j+}j
qi               - reads input as integer
  7Yb            - push an array of [1, 1, 1]. It does this by pushing 7, then
                   turning it into binary.
     {        }j - define a recursive function to calculate a(n), where the
                   predefined values for n = 0,1,2 are 1,1,1
      ((         - subtract 2 from n | Stack: n-2
        _        - duplicate | Stack: n-2, n-2
         j       - find a(n-2) | Stack: n-2, a(n-2)
          \      - swap the top two items in the stack | Stack: a(n-2), n-2
           (     - decrement | Stack: a(n-2), n-3
            j    - find a(n-3) | Stack: a(n-2), a(n-3)
             +   - add, finding a(n)
                 - implicit output

In pseudocode:
read input as integer
define padovan_sequence(n):
    return padovan_sequence(n-2) + padovan_sequence(n-3)
print(padovan_sequence(n))

Stax, 7 bytes
ÉKΦΘÄO¢

Run and debug it

x86, 19 bytes
f:	xor eax, eax
.a:	push edi
.a2:	sub edi, 3
	jc  .l
	call .a
	inc edi
	jmp .a2
.l:	inc eax
	pop edi
	ret

Try it online!

Julia, 21 bytes
!n=n<3||!(n-2)+!(n-3)

Try it online!

Is there any shorter way to get the first three terms to be 1 instead of true than !n=+(n<3||!(n-2)+!(n-3)) Try it online! (24 bytes)?

@Deadcode true == 1, i think I can leave it like that. Otherwise  with Julia 0.7 Try it online!

Arn -al, 9 bytes
I'm not particularly sure why this works...
w®¦€•3=⁺■

Try it! 1-indexed, outputs the nth term
Explained
Unpacked: 1 1 1{#+}->
Exploits Arn's weird precedence bugs to save a byte. A more "normal" version would have {_ _+} as the block or something like {#_+} (as # is a suffix)
[ ... ]      Implied by `-a` flag
  1          First entry = 1
  1          Second entry = 1
  1          Third entry = 1
    {        Other entries determined by
        _      a[n - 1], throwaway implied
      #        This implies the `_` before it while allowing + to not have it b/c bugs
        _    a[n - 2], implied
      +      Plus
        _    a[n - 3]
    }        Return this last value
  ->         Sequence has length of
    _        STDIN; implied
         Then, get last item

J, 17 bytes
$[2&(],_2{+/\)3##

Try it online!
                #   length of input, 1
              3#    1,1,1
 [                     N times:
  2       +/\          sums of length 2 windows
       _2{             pick second to last
     ],                append
$                   take N
{                   (or pick Nth term for same score)

Vyxal, 8 bytes
‡_+T⁺
ḞẎ

Try it Online!
Woo, we beat Jelly!
‡  T      # A triadic lambda function taking three arguments...
 _+       # Pop the first and add the next two
    ⁺NL   # With the initial vector [1, 1, 1]...
       Ḟ  # Create an infinite generator that calls the function with the last <arity> (3 in this case) arguments and appends that to the list.
        Ẏ # Get the first n items.

NL in the explanation represents a literal newline. In Vyxal, ⁺ takes the index of the next character in the Vyxal codepage and adds 101 to it. As Vyxal's codepage is aligned with ASCII, a newline is #10, so the number 111 can be represented by ⁺ and a newline.

8 bytes

@lyxal Nice, forgot about that!

tinylisp, 63 bytes
(d f(q((x y z u)(i u(f y z(a x y)(s u 1))x
(d g(q((x)(f 1 1 1 x

Try it online!
-10 from dlosc

lol my bad.....

What do you think of (d g(q((x)(i(l x 3)1(a(g(s x 2))(g(s x 3

I did not think about naive recursion, lol. You should post it separately

Groovy, 22 bytes
a->a<3?1:f(a-2)+f(a-1)

Try it online!

This is Fibonacci with an extra $1$ term, not Padovan. The correct form for the latter would be a->a<3?1:f(a-3)+f(a-2) Try it online! at the same byte length.

C# (.NET Core), 144 bytes, 0-indexed.
using C=System.Console;class A{static void Main(){int i=int.Parse(C.ReadLine());C.Write(p(i));}static int p(int i){return i<3?1:p(i-2)+p(i-3);}}

Try it online!
Quite frankly, this is not my best work ever.  But here it is.

Excel, 79 77 65 bytes
-2 bytes, sequence didn't need to be horizontal
-12 bytes, change lower bound to 1 and handle errors from COMBIN
=LET(k,A1+2,m,SEQUENCE(INT(k/2)),SUM(IFERROR(COMBIN(m,k-2*m),0)))

It uses the equation \$P(k-2)=\sum_{m=\lceil k/3\rceil}^{\lfloor k/2\rfloor}{m \choose k-2m}.\$
=LET(
k=A1+2                        'k = N + 2
m=SEQUENCE(INT(k/2))          'm = 1 .. floor k/2
SUM(IFERROR(COMBIN(m,k-2*m))) 'Sum of combinations (m, k-2m)

MMIX, 40 bytes (10 instrs)
(jxd)
00000000: e3010000 e3020001 e3030001 22ff0102  ẉ¢¡¡ẉ£¡¢ẉ¤¡¢"”¢£
00000010: c1010200 c1020300 c103ff00 27000001  Ḋ¢£¡Ḋ£¤¡Ḋ¤”¡'¡¡¢
00000020: 5b00fffb f8020000                    [¡”»ẏ£¡¡

(disassembly and explanation)
pado    SETL $1,0       // a(4) - pad(0) except that doesn't work properly
        SETL $2,1       // a(5) - pad(1)
        SETL $3,1       // a(6) - pad(2)
0H      ADDU $255,$1,$2 // a(n + 3) = a(n) + a(n + 1)
        SET  $1,$2      // shift down
        SET  $2,$3
        SET  $3,$255
        SUBU $0,$0,1    // one cycle done
        PBNZ $0,0B      // return if done
        POP  2,0

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
New order #4: World
Introduction (may be ignored)
Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all positive numbers. This is the fourth challenge in this series (links to the first, second and third challenge).
In this challenge, we will explore not one permutation of the natural numbers, but an entire world of permutations!
In 2000, Clark Kimberling posed a problem in the 26th issue of Crux Mathematicorum, a scientific journal of mathematics published by the Canadian Mathematical Society. The problem was:

\$\text{Sequence }a = \begin{cases}
a_1 = 1\\
a_n = \lfloor \frac{a_{n-1}}{2} \rfloor\text{ if }\lfloor \frac{a_{n-1}}{2} \rfloor \notin \{0, a_1, ... , a_{n-1}\}\\
a_n = 3 a_{n-1}\text{ otherwise}
\end{cases}\$
Does every positive integer occur exactly once in this sequence?

In 2004, Mateusz Kwasnicki provided positive proof in the same journal and in 2008, he published a more formal and (compared to the original question) a more general proof. He formulated the sequence with parameters \$p\$ and \$q\$:
\$\begin{cases}
a_1 = 1\\
a_n = \lfloor \frac{a_{n-1}}{q} \rfloor\text{ if }\lfloor \frac{a_{n-1}}{q} \rfloor \notin \{0, a_1, ... , a_{n-1}\}\\
a_n = p a_{n-1}\text{ otherwise}
\end{cases}\$
He proved that for any \$p, q>1\$ such that \$log_p(q)\$ is irrational, the sequence is a permutation of the natural numbers. Since there are an infinite number of \$p\$ and \$q\$ values for which this is true, this is truly an entire world of permutations of the natural numbers. We will stick with the original \$(p, q)=(3, 2)\$, and for these paramters, the sequence can be found as A050000 in the OEIS. Its first 20 elements are:
1, 3, 9, 4, 2, 6, 18, 54, 27, 13, 39, 19, 57, 28, 14, 7, 21, 10, 5, 15

Since this is a "pure sequence" challenge, the task is to output \$a(n)\$ for a given \$n\$ as input, where \$a(n)\$ is A050000.
Task
Given an integer input \$n\$, output \$a(n)\$ in integer format, where:
\$\begin{cases}
a(1) = 1\\
a(n) = \lfloor \frac{a(n-1)}{2} \rfloor\text{ if }\lfloor \frac{a(n-1)}{2} \rfloor \notin \{0, a_1, ... , a(n-1)\}\\
a(n) = 3 a(n-1)\text{ otherwise}
\end{cases}\$
Note: 1-based indexing is assumed here; you may use 0-based indexing, so \$a(0) = 1; a(1) = 3\$, etc. Please mention this in your answer if you choose to use this.
Test cases
Input | Output
---------------
1     |  1
5     |  2
20    |  15
50    |  165
78    |  207
123   |  94
1234  |  3537
3000  |  2245
9999  |  4065
29890 |  149853

Rules

Input and output are integers (your program should at least support input and output in the range of 1 up to 32767)
Invalid input (0, floats, strings, negative values, etc.) may lead to unpredicted output, errors or (un)defined behaviour.
Default I/O rules apply.
Default loopholes are forbidden.
This is code-golf, so the shortest answers in bytes wins

I would answer this using TI-BASIC, but the input would be limited to $0<N<1000$ since lists are limited to 999 elements.  Great challenge nonetheless!

@Tau : although out-of-spec (and this non-competing), I'd be interested in your solution. Do your have one you can post?

I deleted the program, but I should be able to recreate it.  I'll post it as non-competing once I have redone it.

@agtoever, "non-competing" doesn't cover invalid solutions; it was for solutions using languages or language features that were created after a challenge was posted.

PP&CG meta is indeed very clear on this. I wasn't award of such a strict interpretation of "non-competing"... @Tau : it seems you can't post your TI-BASIC solution under these rules. Sorry.

Japt, 15 14 bytes
1-indexed.
@[X*3Xz]kZ Ì}g

Try it
@[X*3Xz]kZ Ì}g     :Implicit input of integer U
             g     :Starting with the array [0,1] do the following U times, pushing the result to the array each time
@                  :  Pass the last element X in the array Z through the following function
 [                 :    Build an array containing
  X*3              :      X multiplied by 3
     Xz            :      X floor divided by 2
       ]           :    Close array
        kZ         :    Remove all elements contained in Z
           Ì       :    Get the last element
            }      :  End function
                   :Implicit output of the last element in the array

JavaScript (ES6),  55 51  50 bytes
Saved 1 byte thanks to @EmbodimentofIgnorance
Saved 1 byte thanks to @tsh
n=>eval("for(o=[p=2];n--;)o[p=o[q=p>>1]?3*p:q]=p")

Try it online!

55 bytes

@EmbodimentofIgnorance I usually avoid that trick, as the eval'ed code is much slower. But the difference is barely noticeable for that one, so I guess that's fine.

But this is code-golf, we don't care about speed, as long as it gets the job done

n=>eval("for(o=[p=2];n--;)o[p=o[q=p>>1]?3*p:q]=p")

Jelly, 15 bytes
µ×3żHḞḢḟȯ1Ṫ;µ¡Ḣ

A full program accepting the integer, n (1-based), from STDIN which prints the result.
Try it online!
How?
µ×3żHḞḢḟȯ1Ṫ;µ¡Ḣ - Main Link: no arguments (implicit left argument = 0)
µ           µ¡  - repeat this monadic chain STDIN times (starting with x=0)
                -                   e.g. x = ...  0      [1,0]            [9,3,1,0]
 ×3             -   multiply by 3                 0      [3,0]            [27,9,3,0]
    H           -   halve                         0      [1.5,0]          [4.5,1.5,0.5,0]
   ż            -   zip together                  [0,0]  [[3,1.5],[0,0]]  [[27,4.5],[9,1.5],[3,0.5],[0,0]]
     Ḟ          -   floor                         [0,0]  [[3,1],[0,0]]    [[27,4],[9,1],[3,0],[0,0]]
      Ḣ         -   head                          0      [3,1]            [27,4]
       ḟ        -   filter discard if in x        []     [3]              [27,4]
        ȯ1      -   logical OR with 1             1      [3]              [27,4]
          Ṫ     -   tail                          1      3                4
           ;    -   concatenate with x            [1,0]  [3,1,0]          [4,9,3,1,0]
              Ḣ - head                            1      3                4
                - implicit print

Perl 6, 49 bytes
-2 bytes thanks to nwellnof
{(1,3,{(3*@_[*-1]Xdiv 6,1).max(*∉@_)}...*)[$_]}

Try it online!
Returns the 0-indexed element in the sequence. You can change this to 1-indexed by changing the starting elements to 0,1 instead of 1,3
Explanation:
{                                             }  # Anonymous code block
 (                                   ...*)[$_]   # Index into the infinite sequence
  1,3                                            # That starts with 1,3
     ,{                             }            # And each element is
       (                 ).max(    )             # The first of
          @_[*-1]X                               # The previous element
        3*        div 6                          # Halved and floored
        3*        div  ,1                        # Or tripled
                               *∉@_             # That hasn't appeared in the sequence yet

05AB1E, 16 15 bytes
Saved 1 byte thanks to Kevin Cruijssen.
0-indexed.
¾ˆ$FDˆx3*‚;ï¯Kн

Try it online!
Explanation
Using n=1 as example
¾ˆ                 # initialize global array as [0]
  $                # initialize stack with 1, input
   F               # input times do:
    Dˆ             # duplicate current item (initially 1) and add one copy to global array
                   # STACK: 1, GLOBAL_ARRAY: [0, 1]
      x            # push Top_of_stack*2
                   # STACK: 1, 2, GLOBAL_ARRAY: [0, 1]
       3*          # multiply by 3
                   # STACK: 1, 6, GLOBAL_ARRAY: [0, 1]
         ‚;ï       # pair and integer divide both by 2
                   # STACK: [0, 3], GLOBAL_ARRAY: [0, 1]
            ¯K     # remove any numbers already in the global array
                   # STACK: [3], GLOBAL_ARRAY: [0, 1]
              н    # and take the head
                   # STACK: 3

15 bytes

@KevinCruijssen: Thanks! I thought of using the global array, but assumed it would be the same length as a list on the stack and never tried it :/

J, 47 40 bytes
[:{:0 1(],<.@-:@{:@](e.{[,3*{:@])])^:[~]

Try it online!
ungolfed
[: {: 0 1 (] , <.@-:@{:@] (e. { [ , 3 * {:@]) ])^:[~ ]

Direct translation of the definition into J.  It builds bottom up by using ^: to iterate from the starting value the required number of times.

Haskell, 67 65 bytes
(h[1,0]!!)
h l@(a:o)|elem(div a 2)o=a:h(3*a:l)|1>0=a:h(div a 2:l)

Try it online!
Uses 0-based indexing.
EDIT: saved 2 bytes by using elem instead of notElem and switching conditions

Java 10, 120 99 bytes
n->{var L=" 1 0 ";int r=1,t;for(;n-->0;L+=r+" ")if(L.contains(" "+(r=(t=r)/2)+" "))r=t*3;return r;}

Try it online.
Explanation:
n->{                              // Method with integer as both parameter and return-type
  var L=" 1 0 ";                  //  Create a String that acts as 'List', starting at [1,0]
  int r=1,                        //  Result-integer, starting at 1
      t;                          //  Temp-integer, uninitialized
  for(;n-->0;                     //  Loop the input amount of times:
      L+=r+" "))                  //    After every iteration: add the result to the 'List'
                          t=r     //   Create a copy of the result in `t`
                       r=(...)/2  //   Then integer-divide the result by 2
    if(L.contains(" "+(...)+" ")) //   If the 'List' contains this result//2:
      r=t*3;                      //    Set the result to `t` multiplied by 3 instead
  return r;}                      //  Return the result

Jelly, 21 bytes
Ø.;0ị×3$:2$:2eɗ?Ɗ$⁸¡Ṫ

Try it online!
A monadic link that takes zero-indexed \$n\$ as the argument and returns \$a(n)\$.

C++ (gcc), 189 180 bytes
-9 bytes to small golfing
#import<vector>
#import<algorithm>
int a(int n){std::vector<int>s={1};for(int i=0;i<n;++i)s.push_back(i&&std::find(s.begin(),s.end(),s[i]/2)==s.end()?s[i]/2:3*s[i]);return s[n-1];}

Try it online!
Computes the sequence up to n, then returns the desired element. Slow for larger indices.

@ceilingcat Unfortunately that affects operator precedence and changes the output of the function.

Ruby, 54 52 48 bytes
->n{*s=0;j=2;n.times{s<<j=s==s-[j/2]?j/2:j*3};j}

Try it online!

Python 2, 66 bytes
l=lambda n,p=1,s=[0]:p*(n<len(s))or l(n,3*p*(p/2in s)or p/2,[p]+s)

Try it online!
Uses zero-based indexing. The lambda does little more than recursively building up the sequence and returning as soon as the required index is reached.

Stax, 14 bytes
üÑα↕○Ü1∟¡f↑ô┬♥

Run and debug it
Zero-indexed.

Wolfram Language (Mathematica), 63 bytes
(L=Last)@Nest[{##,If[FreeQ[#,x=⌊L@#/2⌋],x,3L@#]}&,{0,1},#]&

Try it online!
This is 0-indexed
(In TIO I added -1 in every test case)

Haskell, 55 bytes
(1%[0]!!)
a%o|b<-div a 2=a:last(b:[3*a|elem b o])%(a:o)

Try it online!
Golfing user1472751's slick list-generation method.
Same length:
(1%[0]!!)
a%o=a:[x|x<-[div a 2,a*3],all(/=x)o]!!0%(a:o)

Try it online!

Python 3, 105 103 100 95 83 bytes
-2 bytes thanks to agtoever
-12 bytes thanks to ArBo
def f(n):
 s=0,1
 while len(s)<=n:t=s[-1]//2;s+=(t in s)*3*s[-1]or t,
 return s[-1]

Try it online!

You can replace the for loop with while len(s)<=n and replace the i's with -1. This should shave off one of two characters.

@agtoever that's so clever - thanks! :)

83 bytes by working with a tuple instead of a list, and removing the if from the while loop to allow one-lining that loop

@ArBo wow! absolutely brilliant - thanks :)

Gaia, 22 20 bytes
2…@⟨:):3×¤ḥ⌋,;D)+⟩ₓ)

Try it online!
0-based index.
Credit to Shaggy for the approach
2…			| push [0 1]
  @⟨		 ⟩ₓ	| do the following n times:
    :):			| dup the list L, take the last element e, and dup that
       3×¤ḥ⌋,		| push [3*e floor(e/2)]
	     ;D		| take the asymmetric set difference [3*e floor(e/2)] - L
	       )+	| take the last element of the difference and add it to the end of L (end of loop)
		   )	| finally, take the last element and output it

;D

Python 2, 62 bytes
a=lambda n:n<1or a(n-1)*6**(a(n-1)//2in[0]+map(a,range(n)))//2

Try it online!
Returns True for a(0). 0-indexed.

Husk, 18 bytes
!t¡(→S-o§e*3÷2→)ŀ2

Try it online!
Not sure why I'm unable to compose the iteration function, but I was only able to get it working with parentheses.
+1 byte after fixing the list.

Nice to see that you’re having a take on all my CG challenges, but this one seems to go wrong. Using you tio link and giving 1234 as input, this gives 7074 instead of 3537... I’m not poficient in Husk, so I really have no clue where this goes wrong...

@agtoever oh, there's a 0 at the beginning, just needed to remove that: Try it online!

Yay! You fixed it!

Lua, 78 bytes
x,y=1,3 u={}for _=2,...do
u[x]=0
x,y=y,y//2
if u[y]then y=3*x end
end
print(x)

Try it online!

68 bytes through removing some whitespace, removing the z variable and changing the if statement to ternary

Vyxal, 22 bytes
0⅛3?(:½⌊¾$ḟu=[½⌊|3*]:⅛

Try it Online!
1-indexed.
0⅛                     # Push 0 to glob. arr.
  3                    # Push 3
   ?(                  # Iteration times
             [     ]   # If...
     :½⌊               # Top of stack, halved and floored
        ¾$ḟu=          # Is in global array?
              ½⌊       # Halved and floored
                |      # Else
                 3*    # Tripled
                    :⅛ # And pushed to glob. arr.


text:
Output the Missing Character
When writing a programm 1 missing character can ruin everything,
wouldn't it be great if the programm told you what was missing ?
Task:
Create any (non Empty) programm, that takes no input and outputs nothing.
That when 1 Character is removed from the programm, outputs that Character.
Input: None
Output:
Output nothing if the programm is unmodified.
Output the removed character if one was removed from the programm.
The output is unspecified if any character is changed or added.
The output is also unspecified if more than 1 characters are removed.
The output can not contain any additional characters.
The output can also be an error message, that again must be only 1 character.
Example:
If the programm was the following:
abcd

These 5 Outputs are required:
abcd ->  <NO OUTPUT>
abc  ->  d
abd  ->  c
acd  ->  b
bcd  ->  a

Rules:
This is code-golf shortest code in bytes wins!
Standard loopholes are forbidden.
Explain:
This challenge is not a duplicate of Radiation Detector!.
The original program has to output nothing.
It is allowed to read your own source code.

Possible duplicate

This is not a duplicate of Radiation Detector!, this challenge allows reading your own source and the output cannot be repeated. + The original programm has to output nothing.

The differences are there, but whether or not they're big enough, and how much they might need to be emphasized, is something best evaluated while the question is closed. (Well, it's better in the sandbox...)

I just noticed my close-vote is a hammer.. Still, I think allowing to read your own source code and outputting nothing for the original program will make it slightly different, but I personally don't think it's different enough. But if someone disagrees feel free to vote to re-open and give some arguments why the differences are big enough. PS: Don't feel discouraged that your first challenge is a duplicate, it happens pretty often for new users unfortunately. Feel free to post it in the Sandbox to get feedback, and enjoy your stay!

@peterzuger also, hi, welcome, GREAT first challenge. Most people do not do their first challenge so amazingly well. Please don't be discouraged by how strict we are here; and do use the sandbox, it's a good place to play around, no pun intended. I want to see more questions from you :). You did very well, just accidentally closely mirrored a challenge.


text:
Worn-tile Scrabble
Problem
You're stuck in a cabin in the middle of the woods, with only an old scrabble set to entertain yourselves. Upon inspection you see that the scrabble letters are so worn, that only the points for each letter are visible.
Nonetheless you decide to play a game. You pull seven letters from the bag and place them on your tray, your challenge is to determine what those letters could be.
So generally, given a list of points convert it into any possible string or list of letters.

Scrabble Tiles and Distributions

2 blank tiles (scoring 0 points)
1 point: E ×12, A ×9, I ×9, O ×8, N ×6, R ×6, T ×6, L ×4, S ×4, U ×4
2 points: D ×4, G ×3
3 points: B ×2, C ×2, M ×2, P ×2
4 points: F ×2, H ×2, V ×2, W ×2, Y ×2
5 points: K ×1
8 points: J ×1, X ×1
10 points: Q ×1, Z ×1

So if you have a list of points [10,10,8,5,1,1,1] then "QZJKEEE" would be valid but "QQJKEEE" would not be valid (since there is only 1 Q tile in the bag)

Problem Specific Rules

You may assume all inputs are valid and that there will always be 7 tiles (i.e it wont be a list of seven 10 point tiles and won't be 9 tiles)
You can assume no tiles have been previously pulled from the bag (so the distribution is the standard distribution of english tiles as defined above)
You do not have to generate a valid word, only a valid string of letters.
The order of your string is irrelevant as long as for each tile there is a corresponding letter.
Points are based on the standard english scrabble tile points as defined above.
You may output in upper or lower case, for a blank tile you may output either a space character or an underscore '_'
Your answer may output as any reasonable representation of the tiles such as a List, String, Array or Sequence

General rules:

This is code-golf, so shortest answer in bytes wins.
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
Standard rules apply for your answer with default I/O rules, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs. Your call.
Default Loopholes are forbidden.
If possible, please add a link with a test for your code (i.e. TIO).
Also, adding an explanation for your answer is highly recommended.

Test Cases
Obviously since you can output any possible value it's difficult to define strict test cases.
Some cases with a possible valid return value:
[10,0,10,5,8,8,0] -> "Q ZKJX "
[1,1,1,1,1,1,1] -> "EEEEEEE"
[1,2,3,4,5,8,0] -> "NDBHKJ "
[2,2,2,2,2,2,2] -> "DGDGDGD"

Some cases with an invalid return value:
[10,0,10,5,8,8,0] -> "Q QKJX "  - Too many Qs
[1,1,1,1,1,1,1] -> "EEEEEE "  - Space is 0 points not 1
[1,2,3,4,5,8,0] -> "NDBH" - Too short
[1,2,3,4,5,8,0] -> "NDBHKJ  I" - Too long
[1,2,3,4,5,8,0] -> "ÉDBHKJ1" - Contains none scrabble characters
[2,2,2,2,2,2,2] -> "GDGDGDG" - Contains too many Gs (case for invalid cycling)

Do I need to output a string or is a list ok?

You can output a list, I'll update the question

What can I output for a blank?

Good question I'll let you output a space or _, since typically it could be represented by either. I'll update the question

Suggested test case: [2,2,2,2,2,2,2] (the only case where it's important to start with a D rather than a G if a cycling method is used)

"You may output in upper or lower case" - is mixed-case output allowed?

Yes mixed case is allowed

Thanks (pro tip: use @ to notify someone [only 1 person] - as the poster you are notified of all comments here, but others are not)

Yeah it doesn't work on my phone @jonathan allan

Notifications are @ then the person's name without spaces.  I.e. Expired Data would become @ExpiredData.

Must the input be an array of integers, or can it be an array of string?

I feel like this question was inspired by a real life situation.  In fact last summer we rented an AirBnb whose only scrabble board was in Russian.  Perhaps there is a CG question there too…

@DigitalTrauma I was just bored and thinking about scrabble related problems

JavaScript (ES6), 72 bytes
A shorter variant suggested by @supercat
a=>a.map(o=n=>'?ED?BWQ?_EG?CFZ?_EDJMH?K?EGXPV'[n*9.4+(o[n]=7-~o[n])&31])

Try it online!

JavaScript (ES6),  137 ... 84 78 77  76 bytes
Saved 10 bytes by using Neil's cycling method
Returns a list of tiles. Uses _ for blank tiles.
a=>a.map(o=n=>"____FHVWGDGD_K__BCMPEEEE_ZQ__XJ"[n*20%44%32+(o[n]=-~o[n])%4])

Try it online!
How?
For each number of points, we cycle through a group of exactly 4 tiles, starting with the second tile of each group (this is important for G vs D):
 points | group | max. sequence
--------+-------+---------------
    0   | ____  | __
    1   | EEEE  | EEEEEEE
    2   | GDGD  | DGDGDGD
    3   | BCMP  | CMPBCMP
    4   | FHVW  | HVWFHVW
    5   | _K__  | K         \
    8   | _XJ_  | XJ         }--- these letters may only appear once each
   10   | _ZQ_  | ZQ        /

All these groups are stored as a single string of 31 characters:
____FHVWGDGD_K__BCMPEEEE_ZQ__XJ
^   ^   ^   ^   ^   ^   ^   ^
0   4   8  12  16  20  24  28

NB: We don't need to store the final "_" in "_XJ_", as it will never be accessed anyway.
The number of points \$n\$ is converted to the correct index \$i_n\$ into this string with:
$$i_n=((20\times n)\bmod 44)\bmod 32$$
  n | *20 | mod 44 | mod 32 | group
----+-----+--------+--------+-------
  0 |   0 |    0   |    0   | ____
  1 |  20 |   20   |   20   | EEEE
  2 |  40 |   40   |    8   | GDGD
  3 |  60 |   16   |   16   | BCMP
  4 |  80 |   36   |    4   | FHVW
  5 | 100 |   12   |   12   | _K__
  8 | 160 |   28   |   28   | _XJ_
 10 | 200 |   24   |   24   | _ZQ_

The current position in each group is stored in the object \$o\$.

Advancing o[n] by 8 each time would cost one extra character for the advancement, but allow one to replace %4 and %32 both with &31 for a net win.  My best, based on yours, would be a=>a.map(o=n=>('?ED?BWQ?_EG?CFZ?_EDJMH?K?EGXPV'[n*9.4+(o[n]=7-~o[n])&31])).  A shorter, "almost" version is a=>a.map(o=n=>("_EDBFK_EDCHJQEGMVXZEGPW"[n+(o[n]=5-~o[n])%24])) but that approach would needs a compact way to map the values 8 and 10 into 11 and 12, plus a slight adjustment to the string to fix an off-by-one problem.

@supercat Sounds good! I'll have a closer look at it tomorrow.

@supercat Another interesting formula is '_??VKWZHQFP?M?CGBGXDJD'[(n*96+(o[n]=32-~o[n]))%68%33]||'E', with a lookup string of only 22 characters. The full code is still 2 bytes longer than your solution, though.

Charcoal, 33 bytes
⭆θ§§⪪”＆↖“Ｖh_z↶∕¡⌈∨₂χ¹‖◨⌊″”¶ι№…θκι

Try it online! Link is to verbose version of code. Explanation:
 θ                  Input array
⭆                   Map over elements and join
     ”...”          Literal string " \nE\nDG\nBCMP\nFHVW\nK\n\n\nJX\n\nQZ"
    ⪪     ¶         Split on newlines
   §       ι        Indexed by current element
  §                 Cyclically indexed by
            №…θκι   Number of times current element has already appeared
                    Implcitly print

Jelly,  31 30 27  26 bytes
“ñẒẎYñ(“Nut¦hß’ṃØA;€⁶ɓṢĖœị

A monadic Link accepting a list of integers which yields a list of characters.
- a mishmash of my previous, below, and my improvement of Nick Kennedy's
Try it online!
The output is not given in the same order as the input (this is allowed).
Using 2 of my own additions to the language in an answer does not happen often! (ṃ and ɓ here).
How?
“...“...’ṃØA;€⁶ɓṢĖœị - Link: list of integers, V     e.g. [10,1,0,3,2,1,10]
“...“...’            - list of base 250 integers          [28089224382041, 77611203526272]
          ØA         - 'ABC...XYZ'
         ṃ           - base decompress (vectorises)       ["EDMFKZZJZQ", "NGPYKZZXZZ"]
            ;€       - for €ach: concatenate:
              ⁶      -   a space                          ["EDMFKZZJZQ ", "NGPYKZZXZZ "]
               ɓ     - start a new dyadic chain with swapped arguments - i.e. f(V,that)
                Ṣ    - sort                               [0,1,1,2,3,10,10]
                 Ė   - enumerate                          [[1,0],[2,1],[3,1],[4,2],[5,3],[6,10],[7,10]]
                  œị - multi-dimensional index into       " NEGMZQ"
                       (1-based and modular)

previous @ 30
“²rṛʂṂø5=Ɓṇ^N¥Y»⁾tky;⁶s2ɓṢĖUœị

A monadic Link accepting a list of integers which yields a list of characters.
Try it online!
This one's output is also mixed-case (this is allowed).
How?
“...»⁾tky;⁶s2ɓṢĖUœị - Link: list of integers, V          e.g. [10,1,0,3,2,1,10]
“...»               - compression of dictionary entries:
                    -   "end", "GMP", "fyttes", "adj", and "xci" and the string "qz"
                    -                                         "endGMPfyttesadjxciqz"
        y           - translate with:
     ⁾tk            -   ['t', 'k']                            "endGMPfykkesadjxciqz"
         ;⁶s2ɓṢĖUœị - ...
                    - ...then like the above method (except U reverses each pair of indices)
                                                              " neGMzq"

I think you made a typo in your first explanation. ' NWGMZQ' after the multi-dimensional index into would be quite a feat without any W in the string. ;)

@KevinCruijssen - yws, typo fixwd; thanks!

Pyth - 92 86 83 81 80 75 60 52 49 42 36 bytes
Loops through input, popping off the available letters. I just have one of each letter that together give 7 for that point category. Now using packed string encoding.
K[M*L7c."B_êº çÑOÒ
7âCkÑ"\Lm.)@K

K                       Assign to K
 [M                     Map list(for popping). Uses a quirk of M to splat each first
  *L7                   Map repeating each string by 7
   c      \L            Split on occurrences of 'L'
    ."..."              Packed string encoding of the needed letters
m              (Q)      Map on input (input is taken implicitly)
 .)                     Pop. This returns the first element after removing it
  @K                    Index into K
   (d)                  The loop variable is given implicitly

Btw, this is the original letter string before encoding: "_ E DG BCMP FHVW K   JX  QZ".
Try it online.

05AB1E, 70 52 39 38 29 26 25 bytes
{ε.•3Oû}α›ηö‡.ÝŽ{•2ôÁyèNè?

-18 bytes thanks to @ExpiredData.
-13 bytes by using the same extend to size 7 from @Maltysen's Pyth answer.
-9 bytes by creating a port of @JonathanAllan's Jelly answer, so make sure to upvote him!
-3 bytes thanks to @Emigna.
Results in a list of characters, and uses lowercase letters and a space for blanks.
Try it online or verify some more test cases.
Explanation:
{                      # Sort the (implicit) input-list
 ε                     # Map each character `y` in this list to:
  .•3Oû}α›ηö‡.ÝŽ{•     #  Push compressed string "endgmpfykkzzzzjxzzqz "
                  2ô   #  Split into parts of size 2
                    Á  #  Rotate it once towards the left so the space is leading
  yè                   #  Use integer `y` to index into the string-pairs
    Nè                 #  Then get the `N`'th character of the string-pair (with automatic
                       #   wraparound), where `N` is the index of the loop

See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•3Oû}α›ηö‡.ÝŽ{• is "endgmpfykkzzzzjxzzqz ".

Previous 38 bytes answer:
.•Mñ&Àû«ì{₆v*Å+µ-•#ðšε7∍}IvDyèн©?ε®õ.;

Try it online or verify some more test cases.
Explanation:
.•Mñ&Àû«ì{₆v*Å+µ-•    # Push compressed string "e dg bcmp fhvw k   jx  qz"
                  #   # Split on spaces: ["e","dg","bcmp","fhvw","k","","","jx","","qz"]
                   ðš # Prepend a space to this list
 ε7∍}                 # Extend each string to size 7:
                      #  ["       ","eeeeeee","dgdgdgd","bcmpbcm","fhvwfhv","kkkkkkk","","","jxjxjxj","","qzqzqzq"]
     Iv               # Loop `y` over the input-list:
       Dyè            #  Get the `y`'th string from a copy of the list
          н           #  Get it's first character
           ©?         #  Store it in the register, and print it without trailing newline
        ε             #  Then map each string in the list to:
         ®õ.;         #   Remove the first occurrence of the character from the register

See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•Mñ&Àû«ì{₆v*Å+µ-• is "e dg bcmp fhvw k   jx  qz".

Can't you use "   0eeeeeee0ddddggg0bbccmmp0ffhhvvw0k000jx00qz"?

@ExpiredData Ah, of course. You only draw 7 letter.. Thanks! Will change it.

You can save 3 bytes using {v instead of 7F and y instead of I{Nè.

@Emigna Ah, of course.. Thanks!

Perl 5, 71 bytes
@a=(__,'E'x7,DDDDGGG,BBCCMMP,FFHHVVW,K,1,1,JX,1,QZ);say chop$a[$_]for<>

Try it online!

C (gcc), 110 bytes
_[]={0,7,14,21,0,0,22,0,24};f(char*s){for(;*s+1;s++)*s=*s?*s-1?"DDDDGGGBBCCMMPFFHHVVWKJXQZ"[_[*s-2]++]:69:32;}

Try it online!
Uses the _ array as an index into the static string "DDDDGGGBBCCMMPFFHHVVWKJXQZ" dynamically with exceptions for 0 and 1.
Argument is a -1-terminated array of scores which is transformed in-place into a -1-terminated string.

102 bytes

C# (Visual C# Interactive Compiler), 104 90 bytes
a=>a.OrderBy(x=>x).Select((x,i)=>(x="_ E DG BCMP FHVW K   JX  QZ".Split()[x])[i%x.Length])

Try it online!

Python 3, 178 142 135 127 112 117 bytes
def f(l):
 d=list(map(list,"  _EEEEEEE_DDDDGGG_BBCCMMP_FFHHVVW_K___JX__QZ".split('_')))
 return[d[i].pop()for i in l]

Try it online!
-1 byte thanks to cdlane
correct thanks to mathmandan

in " -> in" for 111

d=list(map(list,"...".split('_'))) to save another byte

This function f probably doesn't need to be named, so you can save 2 bytes.  However, f consumes the entries of d, so I'm not sure that it fits the consensus requirement that "the function has to be reusable arbitrarily often, without...restating...any other code accompanying the submission."  (For example, running f([10,0,10,5,8,8,0]) more than once would result in an error.)  Please see meta discussion here: https://codegolf.meta.stackexchange.com/a/7615/36885

Jelly, 34 32 bytes
“¿RÇĊƈ⁸⁾%ỵṆþœsṀṂ’ṃØAṣ”A;⁶ẋ€7⁸ịḢ€

Try it online!
I hadn’t seen there was a shorter Jelly answer when I wrote this, and this uses a different approach so I thought was worth posting as well.
Thanks to @JonathanAllan for saving 2 bytes!

By using base-decompression, ṃ, you can save 2 bytes

PHP, 101 bytes
$b=[_,E,DG,BCMP,FHVW,K,8=>JX,0,QZ];foreach($argv as$t){echo$c=($d=$b[$t])[0];$b[$t]=substr($d,1).$c;}

As a standalone program, input via command line:
$ php s.php 10 0 10 5 8 8 0
"Q_ZKJX_"

Try it online!
Or 112 bytes as a function
function($a){$b=[_,E,DG,BCMP,FHVW,K,8=>JX,0,QZ];foreach($a as$t)$b[$t]=substr($d=$b[$t],1).$c[]=$d[0];return$c;}

Try it online!
Output
[10,0,10,5,8,8,0]   "Q_ZKJX_"
[1,1,1,1,1,1,1]     "EEEEEEE"
[1,2,3,4,5,8,0]     "EDBFKJ_"
[2,2,2,2,2,2,2]     "DGDGDGD"

Python 2, 102 bytes (or maybe 95?)
(Also fine for Python 3.)
lambda a:''.join([r*7for r in'_ E DG BCMP FHVW K * * JX * QZ'.split()][x][:a.count(x)]for x in set(a))

Try it online!
I don't think the following would be acceptable:
lambda a:[[r*7for r in'_ E DG BCMP FHVW K * * JX * QZ'.split()][x][:a.count(x)]for x in set(a)]

This second version would give output like ['__', 'JX', 'QZ', 'K'].  So the letters would be correct, but they would be collected by point value.  (If this were acceptable, it would save 7 bytes.)

Ruby, 77 76 bytes
->a{r=%w{_ E DG BCMP FHVW K . . JX . QZ};a.map{|i|(r[i]<<r[i][0]).slice! 0}}

Try it online!

Perl 6, 63 bytes
*>>.&{(<_ E DG BCMP FHVW K _ _ JX _ QZ>[$_]x 7).comb[%.{$_}++]}

Try it online!
<_ E DG BCMP FHVW K _ _ JX _ QZ> # array indexed on tile value
(<...>[$_] x 7)     # pull letters for this value, repeat 7 times to catch E
          %         # anonymous stateful hash
           .{$_}    # element for this tile value
                ++  # post increment value to move position
       .comb[...]   # characters to array, pull this incrementing index

So essentially it keeps a lookup of offsets for each tile value and increments them as needed, using the offset to pull a character from the available set.