A158137 Period 9: repeat [-2,4,-2,4,-2,-2,1,1,-2].
-2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2, 4, -2, -2, 1, 1, -2, -2, 4, -2
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1,-1,-1,-1,-1,-1).
Crossrefs
Cf. A156346.
Programs
-
Mathematica
PadRight[{},120,{-2,4,-2,4,-2,-2,1,1,-2}] (* Harvey P. Dale, Dec 11 2018 *)
-
PARI
a(n)=[-2,4,-2,4,-2,-2,1,1,-2][n%9+1] \\ Charles R Greathouse IV, Jul 13 2016
Formula
G.f.: (-2+2*x+4*x^3+x^6+2*x^4+2*x^7)/((1+x+x^2)*(x^6+x^3+1)). 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). - R. J. Mathar, Apr 09 2009
Extensions
Edited and extended by R. J. Mathar, Apr 09 2009
Comments