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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A158459 Period 4: Repeat (0,3,2,1); a(n)=4-n (mod 4). 2
0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

A102370(n) modulo 4.

a(n)=1.5-0.5*(-1)^n+sin(n*Pi/2)-cos(n*Pi/2) [From Richard Choulet (richardchoulet(AT)yahoo.fr), Apr 07 2009]

LINKS

Index to sequences with linear recurrences with constant coefficients, signature (0,0,0,1).

FORMULA

G.f. : x(x^2+2x+3)/(1-x^4) .

a(n)=(1/2)*{(n mod 4)+[(n+1) mod 4]+[(n+2) mod 4]-[(n+3) mod 4]}, with n>=0 [From Paolo P. Lava (paoloplava(AT)gmail.com), Mar 30 2009]

PROG

(PARI) A158459(n)=(-n)%4   \\ - M. F. Hasler, Jan 13 2012

CROSSREFS

Sequence in context: A068494 A195040 A083721 * A031251 A194885 A128317

Adjacent sequences:  A158456 A158457 A158458 * A158460 A158461 A158462

KEYWORD

nonn,easy

AUTHOR

Philippe DELEHAM (kolotoko(AT)wanadoo.fr), Mar 19 2009

EXTENSIONS

Better definition from M. F. Hasler, Jan 13 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 18:59 EST 2012. Contains 206075 sequences.