OFFSET
0,4
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..4000
FORMULA
a(n) = 0, if n <= 1; F(n-1)+1, if n == 0 (mod 3); F(n)+1, if n == 1 (mod 3); 1, if n == 2 (mod 3). - David W. Wilson; corrected by Michel Marcus, Dec 29 2018
For n>=1, a(n) = F(0)<+>F(1)<+>...<+>F(n-1), where operation <+> is defined in comment in A245618. - Vladimir Shevelev, Nov 05 2014
Empirical g.f.: -x^2*(2*x^6 - x^4 + 7*x^3 - 2*x^2 - x - 1) / ((x-1)*(x^2 + x - 1)*(x^4 - x^3 + 2*x^2 + x + 1)). - Colin Barker, Nov 06 2014
PROG
(PARI) a(n) = if (n==0, 0, my(d=a(n-1)-fibonacci(n-1)); if (d>0, d, d+2*fibonacci(n-1))) \\ Michel Marcus, Dec 29 2018
(PARI) a(n) = if (n<=1, 0, my(m=(n % 3)); if (m==0, fibonacci(n-1)+1, if (m==1, fibonacci(n)+1, 1))); \\ \\ Michel Marcus, Dec 29 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Name edited by Michel Marcus, Dec 29 2018
STATUS
approved