login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A204695
a(n) = n^n (mod 9).
1
1, 1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7, 0, 7, 8, 0, 1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7, 0, 7, 8, 0, 1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7, 0, 7, 8, 0, 1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7, 0, 7, 8, 0, 1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7
OFFSET
0,3
COMMENTS
For n>0, periodic with period 18 = A174824(9): repeat [1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7, 0, 7, 8, 0].
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, 1).
FORMULA
G.f.: (x^18 - 8*x^17 - 7*x^16 - 7*x^14 - 4*x^13 - 5*x^11 - x^10 - x^8 - 7*x^7 - 2*x^5 - 4*x^4 - 4*x^2 - x - 1)/(x^18 - 1). - Chai Wah Wu, Jun 04 2016
a(n) = A000312(n) mod 9. - Michel Marcus, Jun 04 2016
MATHEMATICA
Table[PowerMod[n, n, 9], {n, 0, 100}]
Join[{1}, LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7, 0, 7, 8, 0}, 86]] (* Ray Chandler, Aug 27 2015 *)
PROG
(PARI) a(n)=lift(Mod(n, 9)^n) \\ Charles R Greathouse IV, Jan 23 2012
CROSSREFS
Sequence in context: A010636 A222302 A222617 * A175435 A160214 A081087
KEYWORD
nonn,easy
AUTHOR
STATUS
approved