login
A173686
Periodic with period 12: repeat [2,8,2,2,8,5,5,8,5,5,8,2].
0
2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2, 2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2
OFFSET
1,1
FORMULA
G.f.: ( -x*(2+8*x+2*x^2+3*x^5+5*x^6+8*x^7+2*x^8) ) / ( (x-1)*(x^2+1)*(1+x+x^2)*(x^4-x^2+1) ). - R. J. Mathar, Jul 02 2011
a(n) = a(n-3) - a(n-6) + a(n-9). - Wesley Ivan Hurt, Jun 09 2023
MATHEMATICA
LinearRecurrence[{0, 0, 1, 0, 0, -1, 0, 0, 1}, {2, 8, 2, 2, 8, 5, 5, 8, 5}, 108] (* Ray Chandler, Aug 27 2015 *)
PROG
(PARI) a(n)=[2, 8, 2, 2, 8, 5, 5, 8, 5, 5, 8, 2][(n-1)%12+1]; \\ Jinyuan Wang, Feb 26 2020
CROSSREFS
Cf. A181668.
Sequence in context: A065813 A076344 A307450 * A090975 A257579 A199715
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 25 2010
EXTENSIONS
Extended by Ray Chandler, Aug 27 2015
STATUS
approved