login
A138287
Palindromic period 10: repeat 0, 2, 8, 4, 6, 6, 4, 8, 2, 0.
0
0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6
OFFSET
0,2
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
Cf. A117616.
Sequence in context: A329452 A222238 A019611 * A101314 A347213 A054530
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, May 06 2008
STATUS
approved