OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,1,-1).
FORMULA
a(n) = a(n-1) + a(n-9) - a(n-10) for n>9.
a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/9).
G.f.: x*(1+x+x^2+x^3+x^4-x^5-x^6-x^7-x^8) / ((1-x)^2*(1+x+x^2)*(1+x^3+x^6)). - Colin Barker, Apr 15 2016
MATHEMATICA
Table[Sum[(-1)^Floor[(2 i - 2)/9], {i, n}], {n, 0, 100}]
PROG
(PARI) concat(0, Vec(x*(1+x+x^2+x^3+x^4-x^5-x^6-x^7-x^8)/((1-x)^2*(1+x+x^2)*(1+x^3+x^6)) + O(x^50))) \\ Colin Barker, Apr 15 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 15 2016
STATUS
approved