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.

A204817 Final nonzero digit of n^n in base 7.

Original entry on oeis.org

1, 1, 4, 6, 4, 3, 1, 1, 1, 1, 4, 2, 1, 6, 4, 1, 2, 5, 1, 5, 1, 6, 1, 4, 1, 4, 4, 6, 4, 1, 1, 3, 2, 6, 1, 3, 1, 2, 2, 1, 2, 6, 1, 1, 4, 6, 4, 3, 1, 1, 1, 1, 4, 2, 1, 6, 1, 1, 2, 5, 1, 5, 1, 1, 1, 4, 1, 4, 4, 6, 4, 1, 1, 3, 2, 6, 1, 2, 1, 2, 2, 1, 2, 6, 1
Offset: 0

Views

Author

Keywords

Programs

  • Mathematica
    f[0]=1;f[n_]:=Module[{m=n^n},While[Mod[m,7]==0,m=m/7];Mod[m,7]];Table[f[i],{i,0,100}]
  • PARI
    a(n)=lift(Mod(n/7^valuation(n,7),7)^n) \\ Charles R Greathouse IV, Jan 23 2012