A070474 a(n) = n^3 mod 12, n^5 mod 12.
0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3, 4, 5, 0, 7, 8, 9, 4, 11, 0, 1, 8, 3
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Crossrefs
Cf. A167176.
Programs
-
Magma
[Modexp(n, 3, 12 ): n in [0..100]]; // Vincenzo Librandi, Mar 27 2016
-
Mathematica
Table[Mod[n^3,12],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *) PowerMod[Range[0,100],3,12] (* Harvey P. Dale, Oct 29 2014 *)
-
PARI
a(n)=n^3%12 \\ Charles R Greathouse IV, Apr 06 2016
-
Sage
[power_mod(n,7,12)for n in range(0, 100)] # Zerinvary Lajos, Oct 28 2009
Formula
From R. J. Mathar, Jul 23 2009: (Start)
a(n) = a(n-12).
G.f.: -x*(1 + 8*x + 3*x^2 + 4*x^3 + 5*x^4 + 7*x^6 + 8*x^7 + 9*x^8 + 4*x^9 + 11*x^10)/ ((x-1) *(1+x+x ^2) *(1+x) *(1-x+x^2) *(1+x^2) *(x^4-x^2+1)). (End)
Comments