A360259 a(0) = 0, and for any n > 0, let k > 0 be as small as possible and such that F(2) + ... + F(1+k) >= n (where F(m) denotes A000045(m), the m-th Fibonacci number); a(n) = k + a(F(2) + ... + F(1+k) - n).
0, 1, 3, 2, 6, 4, 3, 10, 6, 7, 5, 4, 15, 8, 9, 11, 7, 8, 6, 5, 21, 10, 11, 13, 12, 16, 9, 10, 12, 8, 9, 7, 6, 28, 12, 13, 15, 14, 18, 16, 15, 22, 11, 12, 14, 13, 17, 10, 11, 13, 9, 10, 8, 7, 36, 14, 15, 17, 16, 20, 18, 17, 24, 20, 21, 19, 18, 29, 13, 14, 16
Offset: 0
Examples
The first terms, alongside the corresponding k's, are: n a(n) k ----- ---- --- 0 0 N/A 1 1 1 2 3 2 3 2 2 4 6 3 5 4 3 6 3 3 7 10 4 8 6 4 9 7 4 10 5 4 11 4 4 12 15 5
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10946
Programs
-
PARI
{ t = k = 0; print1 (0); for (n = 1, #a = vector(70), if (n > t, t += fibonacci(1+k++);); print1 (", "a[n] = k+if (t==n, 0, a[t-n]));); }
Formula
a(A001911(n)) = n.
Comments