login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A198517 Period 5: repeat [1,0,1,0,0]. 5
1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0

COMMENTS

Unsigned version of A105385; also partial sums of A156174.

LINKS

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

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

FORMULA

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

a(n) = a(-n+2) = (1/25)*(-4*(n mod 5) + ((n+1) mod 5) + 6*((n+2) mod 5) - 4*((n+3) mod 5) + 6*((n+4) mod 5)).

a(n) + a(n+1) + a(n+2) = A177706(n+4).

a(n) - a(n+2) + a(n+4) = A011658(n+2).

a(n) = ((n+4)^2 mod 5 + (n+4)^4 mod 5)/2. - Gary Detlefs, May 29 2012

a(n) = ((n+1) mod 5) mod 2. - Paolo P. Lava, Feb 18 2015

a(n) = (2/5) * (1 + cos(2*(n-2)*Pi/5) + cos(4*(n-2)*Pi/5) + cos(2*n*Pi/5) + cos(4*n*Pi/5)). - Wesley Ivan Hurt, Sep 26 2018

MATHEMATICA

PadRight[{}, 120, {1, 0, 1, 0, 0}] (* Harvey P. Dale, Dec 09 2012 *)

PROG

(MAGMA) &cat[[1, 0, 1, 0, 0]^^20];

(MAGMA) [((n+1) mod 5) mod 2: n in [0..100]]; // Vincenzo Librandi, Feb 18 2015

(PARI) a(n)=n%5==0 || n%5==2 \\ Charles R Greathouse IV, Oct 28 2011

CROSSREFS

Cf. A079998. See A232990 for another version.

Cf. A057354 (partial sums, without initial zeros).

Sequence in context: A127829 A127831 A164364 * A105385 A190227 A090626

Adjacent sequences:  A198514 A198515 A198516 * A198518 A198519 A198520

KEYWORD

nonn,easy

AUTHOR

Bruno Berselli, Oct 27 2011

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 February 29 09:29 EST 2020. Contains 332355 sequences. (Running on oeis4.)