login
A070595
n^5 mod 9.
0
0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1, 5, 0, 7, 2, 0, 4, 8, 0, 1
OFFSET
0,3
FORMULA
From Chai Wah Wu, Jul 27 2020: (Start)
a(n) = a(n-9) for n > 8.
G.f.: -x*(8*x^7 + 4*x^6 + 2*x^4 + 7*x^3 + 5*x + 1)/(x^9 - 1). (End)
MATHEMATICA
PowerMod[Range[0, 100], 5, 9] (* or *) PadRight[{}, 110, {0, 1, 5, 0, 7, 2, 0, 4, 8}] (* Harvey P. Dale, Jun 15 2022 *)
PROG
(Sage) [power_mod(n, 5, 9)for n in range(0, 101)] # - Zerinvary Lajos, Jun 08 2009
(PARI) a(n)=n^5%9 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
Sequence in context: A292899 A199062 A328900 * A201656 A168195 A333507
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 13 2002
STATUS
approved