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.

A070432 Period 4: repeat [0, 1, 4, 1]; a(n) = n^2 mod 8.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Multiplicative with a(2) = 4, a(2^e) = 0 if e >= 2, a(p^e) = 1 otherwise. - David W. Wilson, Jun 12 2005

Examples

			G.f. = x + 4*x^2 + x^3 + x^5 + 4*x^6 + x^7 + x^9 + 4*x^10 + x^11 + x^13 + ...
		

Crossrefs

Programs

Formula

From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n-4) for n > 3.
G.f.: -x*(1+4*x+x^2) / ( (x-1)*(1+x)*(x^2+1) ). (End)
Dirichlet g.f.: zeta(s)*(1 + 4*2^(-s))*(1 - 2^(-s)). - R. J. Mathar, Mar 10 2011
a(n) = (n mod 2) + 4*floor(((n+1) mod 4)/3). - Gary Detlefs, Dec 29 2011
From Wesley Ivan Hurt, Mar 19 2015: (Start)
a(n) = (((n+1) mod 4) - 1)^2.
a(n) = (1 + (-1)^n - 2(-1)^((2n + 1 - (-1)^n)/4))^2/4. (End)
E.g.f.: 2*cosh(x) + sinh(x) - 2*cos(x). - G. C. Greubel, Mar 22 2016
a(n) = (3 + cos(n*Pi) - 4*cos(n*Pi/2))/2. - Wesley Ivan Hurt, Dec 21 2016
a(n) = a(-n) for all n in Z. - Michael Somos, Dec 22 2016