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

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2017 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070431 a(n) = n^2 mod 6. 20

%I

%S 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,

%T 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,

%U 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

%N a(n) = n^2 mod 6.

%C 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

%C Equivalently n^6 mod 6. - _Zerinvary Lajos_, Nov 06 2009

%C Equivalently: n^(2*m + 2) mod 6; n^4 mod 6 is A070511; See formulas in A070511. - _G. C. Greubel_, Apr 01 2016

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 1).

%F 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

%F a(n) = a(n-6). - _Reinhard Zumkeller_, Apr 24 2009

%p A070431:=n->n^2 mod 6: seq(A070431(n), n=0..100); # _Wesley Ivan Hurt_, Apr 01 2016

%t Table[Mod[n^2, 6], {n, 0, 200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 21 2011 *)

%t LinearRecurrence[{0, 0, 0, 0, 0, 1},{0, 1, 4, 3, 4, 1},101] (* _Ray Chandler_, Aug 26 2015 *)

%o (Sage) [power_mod(n,2,6) for n in xrange(0, 101)] # _Zerinvary Lajos_, Oct 30 2009

%o (Sage) [power_mod(n,6,6) for n in xrange(0, 101)] # _Zerinvary Lajos_, Nov 06 2009

%o (PARI) a(n)=n^2%6 \\ _Charles R Greathouse IV_, Sep 24 2015

%o (MAGMA) [n^2 mod 6 : n in [0..100]]; // _Wesley Ivan Hurt_, Apr 01 2016

%o (MAGMA) [Modexp(n, 2, 6): n in [0..100]]; // _Vincenzo Librandi_, Apr 02 2016

%Y Cf. A000290, A008959, A070435, A070438, A070442, A070452, A070511, A159852.

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, May 12 2002

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 December 10 05:49 EST 2018. Contains 318044 sequences. (Running on oeis4.)