login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130731 Period 4: repeat [1, 2, 0, 0]. 1
1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = (n mod 4) mod 3, with offset 1..a(1)=1. - Gary Detlefs, Mar 28 2010
a(n) = floor(((2*n+4) mod 8)/3). - Gary Detlefs, Jul 02 2011
a(n) = (3-(-1)^n)*(1+I^((n-1)*n))/4. - Bruno Berselli, Sep 28 2011
G.f.: (1+2*x)/(1-x^4). - Bruno Berselli, Sep 28 2011
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) = (3 + 2*cos(n*Pi/2) - cos(n*Pi) + 4*sin(n*Pi/2) - I*sin(n*Pi))/4.
a(n) = a(n-4) for n>3. (End)
a(n) = n + 1 - floor((n+1)/4) - 3*floor((n+2)/4). - Ridouane Oudra, Apr 15 2021
MAPLE
seq(op([1, 2, 0, 0]), n=0..40); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 100, {1, 2, 0, 0}] (* Wesley Ivan Hurt, Jul 09 2016 *)
CoefficientList[Series[(1 + 2 x)/(1 - x^4), {x, 0, 80}], x] (* Michael De Vlieger, Dec 23 2016 *)
PROG
(Magma) &cat [[1, 2, 0, 0]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
Sequence in context: A345957 A325189 A357637 * A287240 A025875 A026840
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Aug 17 2007
EXTENSIONS
Edited by N. J. A. Sloane, Sep 15 2007
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)