login
A070644
a(n) = n^6 mod 21.
0
0, 1, 1, 15, 1, 1, 15, 7, 1, 15, 1, 1, 15, 1, 7, 15, 1, 1, 15, 1, 1, 0, 1, 1, 15, 1, 1, 15, 7, 1, 15, 1, 1, 15, 1, 7, 15, 1, 1, 15, 1, 1, 0, 1, 1, 15, 1, 1, 15, 7, 1, 15, 1, 1, 15, 1, 7, 15, 1, 1, 15, 1, 1, 0, 1, 1, 15, 1, 1, 15, 7, 1, 15, 1, 1, 15, 1, 7, 15, 1, 1, 15, 1, 1, 0, 1, 1, 15, 1, 1
OFFSET
0,4
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
a(n) = a(n-21). - Wesley Ivan Hurt, Dec 26 2023
MATHEMATICA
PowerMod[Range[0, 90], 6, 21] (* or *) PadRight[{}, 90, {0, 1, 1, 15, 1, 1, 15, 7, 1, 15, 1, 1, 15, 1, 7, 15, 1, 1, 15, 1, 1}] (* Harvey P. Dale, Aug 10 2019 *)
PROG
(Sage) [power_mod(n, 6, 21)for n in range(0, 90)] # Zerinvary Lajos, Nov 06 2009
(PARI) a(n)=n^6%21 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
Sequence in context: A040226 A172429 A040225 * A174389 A176286 A111805
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 13 2002
STATUS
approved