login
A070475
a(n) = n^3 mod 13.
1
0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12, 0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12, 0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12, 0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12, 0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12, 0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12, 0, 1, 8, 1, 12, 8, 8, 5, 5, 1, 12, 5, 12, 0, 1
OFFSET
0,3
COMMENTS
Periodic with period length = 13. - Harvey P. Dale, Sep 24 2023
LINKS
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
Sequence in context: A099614 A032012 A092702 * A045771 A070488 A349142
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved