This site is supported by donations to The OEIS Foundation.

 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!)
 A070431 a(n) = n^2 mod 6. 20
 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS a(m*n) = a(m)*a(n) mod 6; a(3*n+k) = a(3*n-k) for k <= 3*n. - Reinhard Zumkeller, Apr 24 2009 Equivalently n^6 mod 6. - Zerinvary Lajos, Nov 06 2009 Equivalently: n^(2*m + 2) mod 6; n^4 mod 6 is A070511; See formulas in A070511. - G. C. Greubel, Apr 01 2016 LINKS Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 1). FORMULA G.f.: -x*(1+4*x+3*x^2+4*x^3+x^4)/((x-1)*(1+x)*(1+x+x^2)*(x^2-x+1)). - R. J. Mathar, Jul 23 2009 a(n) = a(n-6). - Reinhard Zumkeller, Apr 24 2009 MAPLE A070431:=n->n^2 mod 6: seq(A070431(n), n=0..100); # Wesley Ivan Hurt, Apr 01 2016 MATHEMATICA Table[Mod[n^2, 6], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *) LinearRecurrence[{0, 0, 0, 0, 0, 1}, {0, 1, 4, 3, 4, 1}, 101] (* Ray Chandler, Aug 26 2015 *) PROG (Sage) [power_mod(n, 2, 6) for n in xrange(0, 101)] # Zerinvary Lajos, Oct 30 2009 (Sage) [power_mod(n, 6, 6) for n in xrange(0, 101)] # Zerinvary Lajos, Nov 06 2009 (PARI) a(n)=n^2%6 \\ Charles R Greathouse IV, Sep 24 2015 (MAGMA) [n^2 mod 6 : n in [0..100]]; // Wesley Ivan Hurt, Apr 01 2016 (MAGMA) [Modexp(n, 2, 6): n in [0..100]]; // Vincenzo Librandi, Apr 02 2016 CROSSREFS Cf. A000290, A008959, A070435, A070438, A070442, A070452, A070511, A159852. Sequence in context: A243149 A048156 * A070511 A066340 A195597 A143505 Adjacent sequences:  A070428 A070429 A070430 * A070432 A070433 A070434 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.