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.

User: Radu Borza

Radu Borza's wiki page.

Radu Borza has authored 2 sequences.

A209466 Final digit of n^n - n.

Original entry on oeis.org

1, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0
Offset: 0

Author

Radu Borza, Mar 09 2012

Keywords

Comments

Note: cyclic with a period of 20 for n > 0.

References

  • R. Euler & J. Sadek, "A number that gives the units of n^n", Journal of Recreational Mathematics 29:3 (1998), pp. 203-204.

Crossrefs

Cf. A056849.

Programs

  • Maple
    [seq((n^n-n) mod 10, n=1..40)];
  • Mathematica
    Join[{1}, Table[Mod[PowerMod[n, n, 10] - n, 10], {n, 100}]] (* T. D. Noe, Mar 13 2012 *)
    PadRight[{1},120,{0,0,2,4,2,0,0,6,8,0,0,0,4,0,2,0,0,0,6,0}] (* Harvey P. Dale, May 21 2020 *)
  • PARI
    a(n)=lift(Mod(n,10)^n-n) \\ Charles R Greathouse IV, Mar 13 2012
  • Perl
    print (($**$-$_)%10) for (1..40);
    

Formula

a(n) = (n^n-n) mod 10

A208090 100 written in base -n.

Original entry on oeis.org

110100100, 10201, 13330, 400, 324, 202, 244, 271, 100, 121, 144, 169, 172
Offset: 2

Author

Radu Borza, Mar 07 2012

Keywords

Crossrefs

Cf. A065004.

Programs

  • Mathematica
    (* From MathWorld *) NegativeIntegerDigits[0, n_Integer?Negative] := {0}; NegativeIntegerDigits[i_, n_Integer?Negative] := Rest@Reverse@Mod[NestWhileList[(# - Mod[#, -n])/n &, i, # != 0 &], -n]; Table[FromDigits[NegativeIntegerDigits[100, -n]], {n, 2, 14}]