login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Table of n, a(n) for n=0..85.

Index entries for linear recurrences with constant coefficients, signature (0,0,1,0,0,-1).

FORMULA

a(n) = (1/18)*{[(n + 1) mod 18] - 2*[(n + 2) mod 18] + 2*[(n + 3) mod 18] - [(n + 4) mod 18] - [(n + 5) mod 18] + 2*[(n + 6) mod 18] - 2*[(n + 7) mod 18] + [(n + 8) mod 18] - [(n + 10) mod 18] + 2*[(n + 11) mod 18] - 2*[(n + 12) mod 18] + [(n + 13) mod 18] + [(n + 14) mod 18] - 2*[(n + 15) mod 18] + 2*[(n + 16) mod 18] - [(n + 17) mod 18]} - Paolo P. Lava, Jun 03 2008

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 A324682 A098725

Adjacent sequences:  A140315 A140316 A140317 * A140319 A140320 A140321

KEYWORD

sign,easy

AUTHOR

Paul Curtz, May 26 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 02:16 EDT 2019. Contains 327088 sequences. (Running on oeis4.)