login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070442 a(n) = n^2 mod 20. 13
0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Also, n^6 mod 20.

Equivalently n^10 mod 20. - Zerinvary Lajos, Oct 31 2009

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 1).

FORMULA

From Reinhard Zumkeller, Apr 24 2009: (Start)

a(m*n) = a(m)*a(n) mod 20.

a(5*n+k) = a(5*n-k) for k <= 5*n.

a(n+10) = a(n). (End)

a(n) = (1/45)*{11*(n mod 10)+20*[(n+1) mod 10]+29*[(n+2) mod 10]+38*[(n+3) mod 10]-43*[(n+4) mod 10]+56*[(n+5) mod 10]-45*[(n+6) mod 10]-16*[(n+7) mod 10]-7*[(n+8) mod 10]+2*[(n+9) mod 10]}, with n >= 0. - Paolo P. Lava, May 14 2010

G.f. -x*(1+4*x+9*x^2+16*x^3+5*x^4+16*x^5+9*x^6+4*x^7+x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ). - R. J. Mathar, Aug 27 2013

MATHEMATICA

Table[Mod[n^2, 20], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)

LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 1, 4, 9, 16, 5, 16, 9, 4, 1}, 95] (* Ray Chandler, Aug 26 2015 *)

PowerMod[Range[0, 100], 2, 20] (* or *) PadRight[{}, 120, {0, 1, 4, 9, 16, 5, 16, 9, 4, 1}] (* Harvey P. Dale, Jan 06 2019 *)

PROG

(Sage) [power_mod(n, 10, 20) for n in xrange(0, 88)] # Zerinvary Lajos, Oct 31 2009

(PARI) a(n)=n^2%20 \\ Charles R Greathouse IV, Jun 11 2015

CROSSREFS

Cf. A000290, A008959, A010382, A070431, A070435, A070438, A070452, A159852.

Row 20 of A048152.

Sequence in context: A070443 A279403 A070643 * A086957 A096879 A070441

Adjacent sequences:  A070439 A070440 A070441 * A070443 A070444 A070445

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, May 12 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 21:29 EDT 2019. Contains 328273 sequences. (Running on oeis4.)