Post History
JavaScript, 40 bytes f=x=>x>3?f(x-3)*4+f(x-6)-f(x-9)*2:x>0&&2 Try it online! 53 52 bytes Outputs the complete sequence, from my original misinterpretation, backed up by the e...
#3: Post edited
# JavaScript, <s>53</s> 52 bytes- f=(x,y=x)=>x>0?y?f(--y)*2+f(x,y):2+f(--x)+f(--x)*2:0
- [Try it online!](https://tio.run/##y0osSyxOLsosKNEts/j/P81Wo0Kn0rZC09auws7AvtI@TUNXt1JTy0g7DSShaQVi6OpWaEIpLSMrg/8FRZl5JRppGoaamlwwtgkS2xzILi/KLEkFqTHQ1PwPAA)
- # JavaScript, 40 bytes
- f=x=>x>3?f(x-3)*4+f(x-6)-f(x-9)*2:x>0&&2
- [Try it online!](https://tio.run/##FctBCoAgEEDRq7QpHE0ojShr7CpKINSiwkLm9lar/zZ/98nfa9yuR6Yh54CElqxeAiOpgXfiRw/yzwhcGbJNVakczsgIm4mEmNUwwRW342FUakRsFyetM64oXP19APkF)
- ## <s>53</s> 52 bytes
- Outputs the complete sequence, from my original misinterpretation, backed up by the existing solutions, that every 3rd value in our sequence must match the corresponding value in the original sequence.
- f=(x,y=x)=>x>0?y?f(--y)*2+f(x,y):2+f(--x)+f(--x)*2:0
- [Try it online!](https://tio.run/##y0osSyxOLsosKNEts/j/P81Wo0Kn0rZC09auws7AvtI@TUNXt1JTy0g7DSShaQVi6OpWaEIpLSMrg/8FRZl5JRppGoaamlwwtgkS2xzILi/KLEkFqTHQ1PwPAA)
#2: Post edited
# JavaScript, 53 bytesf=x=>x>0&&(g=y=>y?f(--y)*2+g(y):2)(x)+f(--x)+f(--x)*2[Try it online!](https://tio.run/##y0osSyxOLsosKNEts/j/P822wtauws5ATU0j3bbS1q7SPk1DV7dSU8tIO12jUtPKSFOjQlMbJAantIz@lxdllqRqpGkYGmhq/gcA)
- # JavaScript, <s>53</s> 52 bytes
- f=(x,y=x)=>x>0?y?f(--y)*2+f(x,y):2+f(--x)+f(--x)*2:0
- [Try it online!](https://tio.run/##y0osSyxOLsosKNEts/j/P81Wo0Kn0rZC09auws7AvtI@TUNXt1JTy0g7DSShaQVi6OpWaEIpLSMrg/8FRZl5JRppGoaamlwwtgkS2xzILi/KLEkFqTHQ1PwPAA)
