login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A158137
Period 9: repeat [-2,4,-2,4,-2,-2,1,1,-2].
0
-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,1
COMMENTS
Rotated by 7 places, the period is palindromic: 1,-2,-2,4,-2,4,-2,-2,1.
FORMULA
a(n)= A158090(n)-2 = A158090(n)-A007395(n+1).
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
MATHEMATICA
PadRight[{}, 120, {-2, 4, -2, 4, -2, -2, 1, 1, -2}] (* Harvey P. Dale, Dec 11 2018 *)
PROG
(PARI) a(n)=[-2, 4, -2, 4, -2, -2, 1, 1, -2][n%9+1] \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
Cf. A156346.
Sequence in context: A253581 A165464 A308658 * A336409 A010694 A111737
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Mar 13 2009
EXTENSIONS
Edited and extended by R. J. Mathar, Apr 09 2009
STATUS
approved