login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

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

0,3

COMMENTS

Equivalently n^6 mod 5. - Zerinvary Lajos, Nov 06 2009

LINKS

Table of n, a(n) for n=0..100.

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

FORMULA

From R. J. Mathar, Apr 20 2010: (Start)

a(n) = a(n-5).

G.f.: -x*(1+x)*(x^2+3*x+1) / ( (x-1)*(1+x+x^2+x^3+x^4) ). (End)

MATHEMATICA

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

PowerMod[Range[0, 200], 2, 5] (* G. C. Greubel, Mar 22 2016 *)

PROG

(Sage) [power_mod(n, 2, 5)for n in range(0, 101)] # Zerinvary Lajos, Nov 06 2009

(Sage) [power_mod(n, 6, 5)for n in range(0, 101)] # Zerinvary Lajos, Nov 06 2009

(PARI) a(n)=n^2%5 \\ Charles R Greathouse IV, Sep 28 2015

CROSSREFS

Cf. A053879, A070431, A070432.

Sequence in context: A343720 A048152 A350037 * A336302 A163353 A164612

Adjacent sequences:  A070427 A070428 A070429 * A070431 A070432 A070433

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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 26 08:20 EDT 2022. Contains 356993 sequences. (Running on oeis4.)