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”).

A140318
Period 18: repeat 0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 0.
0
0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0
OFFSET
0,1
FORMULA
O.g.f.: (1-x)(x^2+1)x/(1-x^3+x^6). a(n)=a(n-3)-a(n-6). - R. J. Mathar, Jun 12 2008
MATHEMATICA
PadRight[{}, 18*5, {0, 1, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 0}] (* Harvey P. Dale, Dec 11 2011 *)
PROG
(PARI) a(n)=[0, 1, -1, 1, 0, -1, 1, -1, 0][n%9+1]*(-1)^(n\9%2) \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
Sequence in context: A285972 A275510 A286055 * A060584 A098725 A284939
KEYWORD
sign,easy
AUTHOR
Paul Curtz, May 26 2008
STATUS
approved