OFFSET
0,2
FORMULA
For n >= 6, a(n) = A122164(n+5), so there is an explicit formula for the n-th term.
G.f.: -(15*x^10-15*x^9+3*x^8-3*x^7+6*x^6+x^5+8*x^4+5*x^3+3*x^2+2*x+1) / (3*x^5-1). - Alois P. Heinz, Jul 29 2013
MAPLE
a:= n-> if n<=5 then [1, 2, 3, 5, 8, 4][n+1] else [2, 1, 3, 4, 2][modp(n+2, 5)+1] *3^iquo(n+2, 5) fi: seq (a(n), n=0..50); # Alois P. Heinz, Sep 02 2008
MATHEMATICA
Do[a[n] = {1, 2, 3, 5, 8, 4, 12, 6, 18, 9, 27}[[n+1]], {n, 0, 10}]; a[n_] := a[n] = 3 a[n-5]; Array[a, 50, 0] (* Jean-François Alcover, Nov 07 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Aug 06 2008
EXTENSIONS
More terms from Alois P. Heinz, Sep 02 2008
STATUS
approved