Post History
JavaScript, 26 bytes Outputs the nth term, 0-indexed. f=n=>n<2?n:f(--n)*2+f(--n) Try it online! JavaScript, 49 bytes Outputs the first n terms as a comma delimited string. f=n=>...
Answer
#4: Post edited
- # JavaScript, 26 bytes
- Outputs the `n`th term, 0-indexed.
- <!-- language-all: lang-javascript -->
- f=n=>n<2?n:f(--n)*2+f(--n)
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i7Pxsg@zypNQ1c3T1PLSBvC@J@cn1ecn5Oql5OfrpGmYWisqfkfAA)
- # JavaScript, 49 bytes
Outputs the first `n` terms- <!-- language-all: lang-javascript -->
- f=n=>--n&&f(n)+[,(g=n=>n<2?n:g(--n)*2+g(--n))(n)]
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1k5XN09NLU0jT1M7WkcjHSSSZ2Nkn2eVrgGU0dQy0oYwNIEqYv8n5@cV5@ek6uXkp2ukaRgaa2r@BwA)
- # JavaScript, 26 bytes
- Outputs the `n`th term, 0-indexed.
- <!-- language-all: lang-javascript -->
- f=n=>n<2?n:f(--n)*2+f(--n)
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i7Pxsg@zypNQ1c3T1PLSBvC@J@cn1ecn5Oql5OfrpGmYWisqfkfAA)
- # JavaScript, 49 bytes
- Outputs the first `n` terms as a comma delimited string.
- <!-- language-all: lang-javascript -->
- f=n=>--n&&f(n)+[,(g=n=>n<2?n:g(--n)*2+g(--n))(n)]
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1k5XN09NLU0jT1M7WkcjHSSSZ2Nkn2eVrgGU0dQy0oYwNIEqYv8n5@cV5@ek6uXkp2ukaRgaa2r@BwA)
#3: Post edited
- # JavaScript, 26 bytes
- Outputs the `n`th term, 0-indexed.
- <!-- language-all: lang-javascript -->
- f=n=>n<2?n:f(--n)*2+f(--n)
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i7Pxsg@zypNQ1c3T1PLSBvC@J@cn1ecn5Oql5OfrpGmYWisqfkfAA)
- # JavaScript, 26 bytes
- Outputs the `n`th term, 0-indexed.
- <!-- language-all: lang-javascript -->
- f=n=>n<2?n:f(--n)*2+f(--n)
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i7Pxsg@zypNQ1c3T1PLSBvC@J@cn1ecn5Oql5OfrpGmYWisqfkfAA)
- # JavaScript, 49 bytes
- Outputs the first `n` terms
- <!-- language-all: lang-javascript -->
- f=n=>--n&&f(n)+[,(g=n=>n<2?n:g(--n)*2+g(--n))(n)]
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1k5XN09NLU0jT1M7WkcjHSSSZ2Nkn2eVrgGU0dQy0oYwNIEqYv8n5@cV5@ek6uXkp2ukaRgaa2r@BwA)
#2: Post edited
- # JavaScript, 26 bytes
- <!-- language-all: lang-javascript -->
- f=n=>n<2?n:f(--n)*2+f(--n)
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i7Pxsg@zypNQ1c3T1PLSBvC@J@cn1ecn5Oql5OfrpGmYWisqfkfAA)
- # JavaScript, 26 bytes
- Outputs the `n`th term, 0-indexed.
- <!-- language-all: lang-javascript -->
- f=n=>n<2?n:f(--n)*2+f(--n)
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i7Pxsg@zypNQ1c3T1PLSBvC@J@cn1ecn5Oql5OfrpGmYWisqfkfAA)