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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053879 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

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

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

FORMULA

Periodic with period 7.

a(n) = 1/21*{5*(n mod 7)+11*[(n+1) mod 7]-4*[(n+2) mod 7]+2*[(n+3) mod 7]+8*[(n+4) mod 7]-7*[(n+5) mod 7]-[(n+6) mod 7]} with n >= 0 - Paolo P. Lava, Nov 27 2006

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

Cf. A070430, A070431.

Sequence in context: A255708 A197154 A275745 * A216671 A251628 A170988

Adjacent sequences:  A053876 A053877 A053878 * A053880 A053881 A053882

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

License Agreements, Terms of Use, Privacy Policy .

Last modified November 21 16:08 EST 2017. Contains 295003 sequences.