OFFSET
0,3
COMMENTS
n^5 - n^3 == 0 (mod 12) is shown explicitly for n = 0 to 11, then the induction n -> n+12 for the 5th-order polynomial followed by binomial expansion of (n+12)^k concludes that the zero (mod 12) is periodically extended to the other integers. - R. J. Mathar, Jul 23 2009
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).
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)
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 *)
PROG
(Sage) [power_mod(n, 7, 12)for n in range(0, 100)] # Zerinvary Lajos, Oct 28 2009
(Magma) [Modexp(n, 3, 12 ): n in [0..100]]; // Vincenzo Librandi, Mar 27 2016
(PARI) a(n)=n^3%12 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved