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!)
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
FORMULA
G.f.: (1+x^2)/(1-x^5) = (1+x^2)/((1-x)*(1+x+x^2+x^3+x^4)).
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) = (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
a(n) = floor(((2*n-1) mod 5)/3). - Wesley Ivan Hurt, Apr 29 2020
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
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 13:51 EDT 2024. Contains 371725 sequences. (Running on oeis4.)