cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A204695 a(n) = n^n (mod 9).

Original entry on oeis.org

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

Views

Author

Keywords

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].

Crossrefs

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