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.

A191761 Last digit of (2*n)^2. Also period 5: repeat [0, 4, 6, 6, 4].

Original entry on oeis.org

0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0, 4, 6, 6, 4, 0
Offset: 0

Views

Author

Ant King, Jun 18 2011

Keywords

Comments

Original definition: Unit digits of the nonzero, even squares.
This sequence is periodic with period <4,6,6,4,0> of length five. Hence, as the members of each cycle sum to 20, the terms satisfy the fifth-order homogeneous recurrence a(n)=a(n-5) and the fourth-order inhomogeneous recurrence a(n) = 20 - a(n-1) - a(n-2) - a(n-3) - a(n-4).

Examples

			a(5) = (2*5)^2 mod 10 = 100 mod 10 = 0.
		

Crossrefs

Programs

Formula

a(n) = mod(4*n^2,10).
G.f.: (4*x+6*x^2+6*x^3+4*x^4+0*x^5)/(1-x^5) (note that the coefficients of x in the numerator are the terms that constitute the periodic cycle of the sequence).
G.f. -2*x*(1+x)*(2*x^2+x+2) / ( (x-1)*(1+x+x^2+x^3+x^4) ). - R. J. Mathar, Oct 08 2011
a(n) = 4+(16*cos(2*Pi/5)-24*cos(Pi/5))*cos(2*Pi*n/5)/5 +(24*cos(2*Pi/5)-16*cos(Pi/5))*cos(4*Pi*n/5)/5. - R. J. Mathar, Oct 08 2011
a(n) = A010879(A016742(n)). - Michel Marcus, Aug 11 2015