login
A070483
a(n) = n^3 mod 21.
1
0, 1, 8, 6, 1, 20, 6, 7, 8, 15, 13, 8, 6, 13, 14, 15, 1, 20, 15, 13, 20, 0, 1, 8, 6, 1, 20, 6, 7, 8, 15, 13, 8, 6, 13, 14, 15, 1, 20, 15, 13, 20, 0, 1, 8, 6, 1, 20, 6, 7, 8, 15, 13, 8, 6, 13, 14, 15, 1, 20, 15, 13, 20, 0, 1, 8, 6, 1, 20, 6, 7, 8, 15, 13, 8, 6, 13, 14, 15, 1, 20, 15, 13, 20
OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 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-21).
G.f.: (-x -8*x^2 -6*x^3 -x^4 -20*x^5 -6*x^6 -7*x^7 -8*x^8 -15*x^9 -13*x^10 -8*x^11 -6*x^12 -13*x^13 -14*x^14 -15*x^15 -x^16 -20*x^17 -15*x^18 -13*x^19 -20*x^20)/(-1 + x^21). (End)
MATHEMATICA
PowerMod[Range[0, 90], 3, 21] (* G. C. Greubel, Mar 28 2016 *)
PROG
(Sage) [power_mod(n, 3, 21 )for n in range(0, 84)] # Zerinvary Lajos, Oct 29 2009
(Magma) [Modexp(n, 3, 21): n in [0..100]]; // Vincenzo Librandi, Mar 29 2016
(PARI) a(n)=n^3%21 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
Sequence in context: A153493 A113212 A275008 * A124605 A272430 A021120
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved