JavaScript (ES6), (削除) 66 (削除ここまで) 65 bytes
Returns the \$n\$-th term, 0-indexed.
Uses @Neil's trick.
n=>(g=a=>i<2*n?g([s,...a.map(x=>s+=a[--j],j=i++)]):s>>n)([i=s=1])
Arnauld
- 205.5k
- 21
- 187
- 670