A138287 Palindromic period 10: repeat 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, 6, 4, 8, 2, 0, 0, 2, 8, 4, 6
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,-1,1,-1,1).
Crossrefs
Cf. A117616.
Programs
-
PARI
a(n)=[0, 2, 8, 4, 6, 6, 4, 8, 2, 0][n%10+1] \\ Charles R Greathouse IV, Jul 13 2016
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)