login
A352964
a(0) = 0, a(1) = 1, and for any n > 1, a(n) = a(n-F(e)) + a(n-F(e+1)) with e as large as possible (where F(k) is the k-th Fibonacci number).
2
0, 1, 1, 1, 2, 1, 2, 3, 1, 3, 2, 3, 5, 1, 3, 4, 2, 5, 3, 5, 8, 1, 4, 3, 4, 7, 2, 5, 7, 3, 8, 5, 8, 13, 1, 4, 5, 3, 7, 4, 7, 11, 2, 7, 5, 7, 12, 3, 8, 11, 5, 13, 8, 13, 21, 1, 5, 4, 5, 9, 3, 7, 10, 4, 11, 7, 11, 18, 2, 7, 9, 5, 12, 7, 12, 19, 3, 11, 8, 11, 19
OFFSET
0,5
COMMENTS
This sequence is a variant of the Fibonacci sequence (A000045) with variable steps.
FORMULA
a(A000045(k)) = 1 for any k > 0.
EXAMPLE
a(0) = 0 by definition.
a(1) = 1 by definition.
a(2) = a(2-F(2)) + a(2-F(3)) = a(1) + a(0) = 1 + 0 = 1.
a(3) = a(3-F(3)) + a(3-F(4)) = a(1) + a(0) = 1 + 0 = 1.
a(4) = a(4-F(3)) + a(4-F(4)) = a(2) + a(1) = 1 + 1 = 2.
a(5) = a(5-F(4)) + a(5-F(5)) = a(2) + a(0) = 1 + 0 = 1.
a(6) = a(6-F(4)) + a(6-F(5)) = a(3) + a(1) = 1 + 1 = 2.
a(7) = a(7-F(4)) + a(7-F(5)) = a(4) + a(2) = 2 + 1 = 3.
a(8) = a(8-F(5)) + a(8-F(6)) = a(3) + a(0) = 1 + 0 = 1.
PROG
(PARI) { e=2; for (n=1, #a=vector(81), print1 (a[n]=if (n==1, 0, n==2, 1, if (n>fibonacci(e+2), e++); a[n-fibonacci(e)]+a[n-fibonacci(e+1)]), ", ")) }
CROSSREFS
See A352961 for a similar sequence.
Sequence in context: A048793 A344084 A249783 * A209278 A326921 A370408
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Apr 11 2022
STATUS
approved