OFFSET
0,9
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1, -1, 1, 1, 3, 2, 2, -1, -1, -2, -1, -1).
FORMULA
a(n) = a(n-3)+a(n-5)+b(n) where b(n) is the 15-cycle: (1,1,0,0,1,1,0,1,0,0,2,0,0,1,0) with b(n)=b(n-15) starting at b(13)=1. e.g. b(28)=b(13). The initial values for a(n) are: a(8)=2, a(9)=0, a(10)=0, a(11)=3, a(12)=0.
G.f.: x^8*(x^4+x^3+2*x^2+2*x+2) / ((x-1)*(x^2+x+1)*(x^4+x^3+x^2+x+1)*(x^5+x^3-1)). - Colin Barker, Jul 24 2014
EXAMPLE
a(20)=6, the tuples being: (533333),(353333),(335333),(333533),(333353),(333335).
MATHEMATICA
CoefficientList[Series[x^8*(x^4 + x^3 + 2*x^2 + 2*x + 2)/((x - 1)*(x^2 + x + 1)*(x^4 + x^3 + x^2 + x + 1)*(x^5 + x^3 - 1)), {x, 0, 60}], x] (* Wesley Ivan Hurt, Jul 24 2014 *)
PROG
(PARI) a=[0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0]; b=[1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0]; k=1; for(n=13, 100, a=concat(a, a[n-3]+a[n-5]+b[k]); if(k==#b, k=1, k++)); a \\ Colin Barker, Jul 24 2014
(Haskell)
a245492 n = a245492_list !! (n-1)
a245492_list = [0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0] ++
zipWith3 (((+) .) . (+))
(drop 8 a245492_list) (drop 10 a245492_list)
(cycle [1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0])
-- Reinhard Zumkeller, Jul 28 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Neil McGrath, Jul 24 2014
EXTENSIONS
More terms from Colin Barker, Jul 24 2014
STATUS
approved