login
A137797
a(n) = 2*( (n+1) mod 5 ) - 2*( (n+1) mod 2 ).
1
0, 4, 4, 8, -2, 2, 2, 6, 6, 0, 0, 4, 4, 8, -2, 2, 2, 6, 6, 0, 0, 4, 4, 8, -2, 2, 2, 6, 6, 0, 0, 4, 4, 8, -2, 2, 2, 6, 6, 0, 0, 4, 4, 8, -2, 2, 2, 6, 6, 0, 0, 4, 4, 8, -2, 2, 2, 6, 6, 0, 0, 4, 4, 8, -2, 2, 2, 6, 6, 0, 0, 4, 4, 8, -2, 2, 2, 6, 6
OFFSET
0,2
COMMENTS
The sequence is periodic with period 10. - Colin Barker, Dec 16 2014
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
Suggested by A010700. Used in A137798.
Sequence in context: A067736 A181387 A091671 * A358561 A176295 A140874
KEYWORD
easy,sign
AUTHOR
William A. Tedeschi, Feb 10 2008
STATUS
approved