OFFSET
0,4
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
For i >= 1, a(5i) = 3^i, a(5i+1) = 4*3^(i-1), a(5i+2) = 2*3^(i-1), a(5i+3) = 2*3^i, a(5i+4) = 3^i. - N. J. A. Sloane, Aug 06 2008
O.g.f.: x(-1-x-2x^2-x^3-3x^4-x^5+x^6)/(3x^5-1). - R. J. Mathar, Aug 07 2008
MATHEMATICA
Do[a[n] = {0, 1, 1, 2, 1, 3, 4, 2}[[n+1]], {n, 0, 7}]; a[n_] := a[n] = 3*a[n-5]; Array[a, 53, 0] (* Jean-François Alcover, Nov 07 2016 *)
nxt[{s_, a_, b_}]:=If[EvenQ[b]&&s==0, {1, b, b/2}, {0, b, a+b}]; NestList[nxt, {0, 0, 1}, 60][[All, 2]] (* Harvey P. Dale, Oct 25 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Philip van den Bossche (filip020667(AT)hotmail.com), Aug 03 2008
EXTENSIONS
Edited by N. J. A. Sloane, Aug 06 2008
Extended by R. J. Mathar, Aug 07 2008
STATUS
approved