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.

Showing 1-2 of 2 results.

A120962 Final digit (in decimal system) of n^(n^n), i.e., n^(n^n) mod 10.

Original entry on oeis.org

0, 1, 6, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 7, 6, 5
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2006, Oct 26 2007

Keywords

Comments

Periodic sequence with period length 20. - Arkadiusz Wesolowski, Feb 12 2012

Crossrefs

Programs

  • Maple
    seq(n &^ (n^n) mod 10, n=0..105);
  • Mathematica
    Join[{0}, Table[PowerMod[n, n^n, 10], {n, 100}]] (* Stefan Steinerberger, Nov 23 2007 *)
  • PARI
    a(n)=if(n%10,lift(Mod(n,10)^lift(Mod(n,20)^n)),0) \\ Charles R Greathouse IV, Feb 12 2012
    
  • Python
    def A120962(n): return pow(n,n**n,10) # Chai Wah Wu, Sep 22 2023

Formula

a(n) = A010879(A002488(n)). - Michel Marcus, Aug 04 2015

Extensions

More terms from Stefan Steinerberger, Nov 23 2007

A364789 Initial digit of (n^n)^n (A002489(n)).

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 1, 2, 6, 1, 1, 1, 2, 1, 4, 4, 1, 3, 5, 4, 2, 1, 5, 2, 1, 5, 3, 2, 3, 7, 2, 1, 1, 4, 2, 3, 9, 7, 1, 1, 1, 1, 2, 1, 5, 5, 2, 4, 3, 1, 2, 2, 1, 3, 4, 3, 2, 6, 1, 2, 2, 1, 8, 3, 1, 3, 8, 1, 3, 5, 9, 1, 2, 4, 8, 1, 3, 1, 3, 1, 5, 3, 3, 3, 5, 1, 3
Offset: 0

Views

Author

Marco RipĂ , Aug 08 2023

Keywords

Comments

a(0) = 1 is from (0^0)^0 = 1 per A002489.
The author conjectures that this sequence obeys the well-known Benford's law.

Examples

			a(4) = 4, since (4^4)^4 = 4^(4^2) = 4294967296.
		

Crossrefs

Cf. A229522 (final digit).

Programs

Formula

a(n) = floor(((n^n)^n)/10^floor(log_10((n^n)^n))).
a(n) = A000030(A002489(n)).
Showing 1-2 of 2 results.