A204695 a(n) = n^n (mod 9).
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
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).
Programs
-
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 *)
-
PARI
a(n)=lift(Mod(n,9)^n) \\ Charles R Greathouse IV, Jan 23 2012
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
Comments