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].

This page as a plain text file.
%I A191761 #29 Sep 27 2015 11:19:18
%S A191761 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,
%T A191761 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,
%U A191761 6,4,0
%N A191761 Last digit of (2*n)^2. Also period 5: repeat [0, 4, 6, 6, 4].
%C A191761 Original definition: Unit digits of the nonzero, even squares.
%C A191761 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).
%H A191761 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1).
%F A191761 a(n) = mod(4*n^2,10).
%F A191761 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).
%F A191761 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
%F A191761 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
%F A191761 a(n) = A010879(A016742(n)). - _Michel Marcus_, Aug 11 2015
%e A191761 a(5) = (2*5)^2 mod 10 = 100 mod 10 = 0.
%t A191761 Mod[4#^2,10] &/@Range[50]
%t A191761 PadRight[{},120,{0,4,6,6,4}] (* _Harvey P. Dale_, Sep 27 2015 *)
%o A191761 (PARI) a(n)=4*n^2%10 \\ _Charles R Greathouse IV_, Jun 19 2011
%o A191761 (PARI) a(n)=[0, 4, 6, 6, 4][n%5+1]  \\ _M. F. Hasler_, Jun 11 2011
%Y A191761 Cf. A016742, A010879, A191762.
%K A191761 nonn,easy
%O A191761 0,2
%A A191761 _Ant King_, Jun 18 2011