OFFSET
0,3
COMMENTS
Periodic with period length = 13. - Harvey P. Dale, Sep 24 2023
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, 0, 1).
FORMULA
From G. C. Greubel, Mar 28 2016: (Start)
a(n) = a(n-13).
G.f.: (-x - 8*x^2 - x^3 - 12*x^4 - 8*x^5 - 8*x^6 - 5*x^7 - 5*x^8 - x^9 - 12*x^10 - 5*x^11 - 12*x^12)/(-1 + x^13). (End)
MATHEMATICA
Table[Mod[n^3, 13], {n, 0, 100}] (* G. C. Greubel, Mar 28 2016 *)
PowerMod[Range[0, 100], 3, 13] (* or *) PadRight[{}, 100, {0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12}] (* Harvey P. Dale, Sep 24 2023 *)
PROG
(Sage) [power_mod(n, 3, 13 )for n in range(0, 93)] # Zerinvary Lajos, Oct 29 2009
(PARI) a(n)=n^3%13 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved