cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A152822 Periodic sequence [1,1,0,1] of length 4.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Richard Choulet, Dec 13 2008

Keywords

Crossrefs

Characteristic function of A042965.
Cf. A026052, A026064, A320111 (inverse Möbius transform).
Sequence A166486 shifted by two terms.

Programs

Formula

a(n) = 3/4 - (1/4)*(-1)^n + (1/2)*cos(n*Pi/2);
a(n+4) = a(n) with a(0) = a(1) = a(3) = 1 and a(2) = 0;
O.g.f.: (1+z+z^3)/(1-z^4);
a(n) = ceiling(cos(Pi*n/4)^2). - Wesley Ivan Hurt, Jun 12 2013
From Antti Karttunen, May 03 2022: (Start)
Multiplicative with a(p^e) = 1 for odd primes, and a(2^e) = [e > 1]. (Here [ ] is the Iverson bracket, i.e., a(2^e) = 0 if e=1, and 1 if e>1).
a(n) = A166486(2+n).
(End)
Dirichlet g.f.: zeta(s)*(1 - 1/2^s + 1/4^s). - Amiram Eldar, Dec 27 2022

Extensions

More terms from Philippe Deléham, Dec 21 2008
Keyword:mult added by Andrew Howroyd, Jul 27 2018