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!)
A053879 a(n) = n^2 mod 7. 10
0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
Periodic with period 7.
G.f.: -x*(1+x)*(x^4 + 3*x^3 - x^2 + 3*x + 1) / ( (x-1)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6) ). - R. J. Mathar, Feb 24 2011
MATHEMATICA
Table[Mod[n^2, 7], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *)
LinearRecurrence[{0, 0, 0, 0, 0, 0, 1}, {0, 1, 4, 2, 2, 4, 1}, 105] (* Ray Chandler, Aug 26 2015 *)
PowerMod[Range[0, 120], 2, 7] (* or *) PadRight[{}, 120, {0, 1, 4, 2, 2, 4, 1}] (* Harvey P. Dale, Sep 01 2017 *)
PROG
(PARI) a(n)=n^2%7 \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
Sequence in context: A255708 A197154 A275745 * A216671 A251628 A170988
KEYWORD
nonn,easy
AUTHOR
Stuart M. Ellerstein (ellerstein(AT)aol.com), Apr 01 2000
EXTENSIONS
More terms from James A. Sellers, Apr 08 2000
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 April 25 08:25 EDT 2024. Contains 371964 sequences. (Running on oeis4.)