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-5 of 5 results.

A056849 Final digit of n^n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Aug 30 2000

Keywords

Comments

Cyclic with a period of 20.
Also decimal expansion of 147656369016365674900/(10^20-1). - Bruno Berselli, Sep 27 2021

References

  • R. Euler and J. Sadek, "A Number That Gives The Units Of n^n", Journal of Recreational Mathematics, vol. 29(3), 1998, pp. 203-4.

Crossrefs

Programs

  • Magma
    [Modexp(n, n, 10): n in [1..100]]; // Bruno Berselli, Sep 27 2021
    
  • Maple
    seq(n &^ n mod 10, n=1..120);
  • Mathematica
    Table[PowerMod[n, n, 10], {n, 1, 100}]
  • PARI
    a(n)=lift(Mod(n,10)^n) \\ Charles R Greathouse IV, Dec 29 2012
    
  • Python
    def a(n): return pow(n, n, 10)
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Sep 13 2022

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

A138029 Main diagonal of A138028; the most significant digit of n^(n-1).

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Feb 10 2008

Keywords

Crossrefs

Programs

  • Maple
    f:= n -> floor(10^frac((n-1)*log[10](n))):
    map(f, [$1..200]); # Robert Israel, Jan 15 2019
  • Mathematica
    f[n_, k_] := Quotient[n^k, 10^Floor[k*Log[10, n]]]; Table[ f[ n, n - 1], {n, 105}]

Extensions

Name corrected by Robert Israel, Jan 15 2019

A365707 Initial digit of n^(n+1) (A007778(n)).

Original entry on oeis.org

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

Views

Author

Marco Ripà, Sep 16 2023

Keywords

Examples

			a(3) = 8, since 3^(3+1) = 3^4 = 81.
		

Crossrefs

Programs

  • Maple
    seq(convert(n^(n+1),base,10)[-1],n=0..100); # Robert Israel, Feb 16 2024
  • Mathematica
    Join[{0}, Table[Floor[n^(n+1)/10^Floor[Log10[n^(n+1)]]], {n, 86}]]

Formula

a(n) = floor((n^(n+1))/10^floor(log_10(n^(n+1)))).
a(n) = A000030(A007778(n)).

A138028 The array of the most significant digit of n^k read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Feb 10 2008

Keywords

Examples

			n\k
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... .
1, 2, 4, 8, 1, 3, 6, 1, 2, 5, 1, 2, 4, 8, 1, 3, 6, 1, 2, 5, 1, ... .
1, 3, 9, 2, 8, 2, 7, 2, 6, 1, 5, 1, 5, 1, 4, 1, 4, 1, 3, 1, 3, ... .
1, 4, 1, 6, 2, 1, 4, 1, 6, 2, 1, 4, 1, 6, 2, 1, 4, 1, 6, 2, 1, ... .
1, 5, 2, 1, 6, 3, 1, 7, 3, 1, 9, 4, 2, 1, 6, 3, 1, 7, 3, 1, 9, ... .
1, 6, 3, 2, 1, 7, 4, 2, 1, 1, 6, 3, 2, 1, 7, 4, 2, 1, 1, 6, 3, ... .
1, 8, 6, 5, 4, 3, 2, 2, 1, 1, 1, 8, 6, 5, 4, 3, 2, 2, 1, 1, 1, ... .
1, 9, 8, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, ... .
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... .
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, ... .
1, 1, 1, 1, 2, 2, 2, 3, 4, 5, 6, 7, 8, 1, 1, 1, 1, 2, 2, 3, 3, ... .
......................................................................
		

Crossrefs

Programs

  • Mathematica
    f[n_, k_] := Quotient[n^k, 10^Floor[k*Log[10, n]]]; Table[f[ n - k, k], {n, 14}, {k, 0, n - 1}] // Flatten
Showing 1-5 of 5 results.