OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,-1,1,-1,1).
FORMULA
From Chai Wah Wu, Jun 04 2016: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) - a(n-6) + a(n-7) - a(n-8) + a(n-9) for n > 8.
G.f.: 2*x*(1 + 3*x - x^2 + 4*x^3 - x^4 + 3*x^5 + x^6)/((1 - x)*(1 - x + x^2 - x^3 + x^4)*(1 + x + x^ 2 + x^3 + x^4)). (End)
PROG
(PARI) a(n)=[0, 2, 8, 4, 6, 6, 4, 8, 2, 0][n%10+1] \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, May 06 2008
STATUS
approved