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

 

Logo

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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
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

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

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

FORMULA

a(n) = (1/8)*(-(n mod 4)+((n+1) mod 4)+5*((n+2) mod 4)-((n+3) mod 4)). - Paolo P. Lava, Aug 28 2007

a(n) = 3/4 + (1/4-(1/2)*I)*I^n - (1/4)*(-1)^n + (1/4+(1/2)*I)*(-I)^n. - Paolo P. Lava, Jul 17 2008

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

Adjacent sequences: A130728 A130729 A130730 * A130732 A130733 A130734

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 November 28 19:17 EST 2022. Contains 358421 sequences. (Running on oeis4.)