OFFSET
0,2
COMMENTS
The sequence is periodic with period 10. - Colin Barker, Dec 16 2014
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1,0,0,0,1,1).
FORMULA
a(n) = -a(n-1)+a(n-5)+a(n-6) for n>5. - Colin Barker, Dec 16 2014
G.f.: -2*x*(3*x^3+6*x^2+4*x+2) / ((x-1)*(x+1)*(x^4+x^3+x^2+x+1)). - Colin Barker, Dec 16 2014
EXAMPLE
a(2) = 2*((2+1) mod 5) - 2*((2+1) mod 2) = 2*(3 mod 5) - 2*(3 mod 2) = 4.
MATHEMATICA
LinearRecurrence[{-1, 0, 0, 0, 1, 1}, {0, 4, 4, 8, -2, 2}, 100] (* Harvey P. Dale, Jun 08 2015 *)
PROG
(PARI) concat(0, Vec(-2*x*(3*x^3+6*x^2+4*x+2)/((x-1)*(x+1)*(x^4+x^3+x^2+x+1)) + O(x^100))) \\ Colin Barker, Dec 16 2014
CROSSREFS
KEYWORD
easy,sign
AUTHOR
William A. Tedeschi, Feb 10 2008
STATUS
approved