|
|
A174618
|
|
For n odd a(n) = a(n-2) + a(n-3), for n even a(n) = a(n-2) + a(n-5); with a(1) = 0, a(2) = 1.
|
|
2
|
|
|
0, 1, 0, 1, 1, 1, 2, 1, 3, 2, 4, 4, 6, 7, 10, 11, 17, 17, 28, 27, 45, 44, 72, 72, 116, 117, 188, 189, 305, 305, 494, 493, 799, 798, 1292, 1292, 2090, 2091, 3382, 3383, 5473, 5473, 8856, 8855, 14329, 14328, 23184, 23184, 37512, 37513, 60696
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: -x^2*(1-x^2+x^3) / ( (x^4-x^2+1)*(x^4+x^2-1) ). - R. J. Mathar, Jan 27 2011
|
|
EXAMPLE
|
As consecutive pairs: (0,1),(0,1),(1,1),(2,1),(3,2),(4,4),...
|
|
MATHEMATICA
|
nxt[{n_, a_, b_, c_, d_, e_}]:={n+1, b, c, d, e, If[EvenQ[n], d+c, d+a]}; NestList[nxt, {5, 0, 1, 0, 1, 1}, 50][[All, 2]] (* or *) LinearRecurrence[ {0, 2, 0, -1, 0, 0, 0, 1}, {0, 1, 0, 1, 1, 1, 2, 1}, 60] (* Harvey P. Dale, Nov 15 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|