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.

Previous Showing 11-15 of 15 results.

A365936 Final digit (in decimal system) of n^(n-1) = A000169(n).

Original entry on oeis.org

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

Views

Author

Marco RipĂ , Sep 23 2023

Keywords

Comments

This is a periodic sequence with period 20 which is twice the considered radix.

Examples

			For n = 4, a(4) = 4^3 mod 10 = 64 mod 10 = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Last[IntegerDigits[n^(n-1)]]; Array[a,87] (* Stefano Spezia, Sep 26 2023 *)

Formula

a(n) = n^(n-1) mod 10.
a(n) = A365935(n+10).

A143959 Final digit of n^(n+1)-(n+1)^n for n>2.

Original entry on oeis.org

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

Views

Author

Sébastien Dumortier, Sep 05 2008

Keywords

Comments

Cyclic with a period of 20

Crossrefs

Programs

  • Mathematica
    Last[IntegerDigits[#^(#+1)-(#+1)^#]]&/@ Range[3,150]  (* Harvey P. Dale, Mar 12 2011 *)
  • Python
    # -*- coding: iso-8859-1 -*- from math import * n=3 while n<100: ....r=(n**(n+1)-(n+1)**n)%10 ....print r, ....n=n+1

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

Views

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

A309697 a(n) is the digit that precedes the last nonzero digit of n^n.

Original entry on oeis.org

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

Views

Author

Michel Marcus, Aug 13 2019

Keywords

Comments

Chu proves that the constant 0.00252541801... is transcendental.

Crossrefs

Cf. A056849.

Programs

  • Mathematica
    a[n_] := Floor[PowerMod[n/10^IntegerExponent[n, 10], n, 100]/10]; Array[a, 100] (* Giovanni Resta, Aug 13 2019 *)
  • PARI
    a(n) = {my(d=digits(n^n)); forstep (k=#d, 1, -1, if (d[k], if (k==1, return (0)); return (d[k-1]));); return(0);}

A347671 a(n) = n^n mod 100.

Original entry on oeis.org

1, 1, 4, 27, 56, 25, 56, 43, 16, 89, 0, 11, 56, 53, 16, 75, 16, 77, 24, 79, 0, 21, 84, 67, 76, 25, 76, 3, 36, 69, 0, 31, 76, 13, 36, 75, 36, 17, 4, 59, 0, 41, 64, 7, 96, 25, 96, 63, 56, 49, 0, 51, 96, 73, 56, 75, 56, 57, 84, 39, 0, 61, 44, 47, 16, 25, 16, 23
Offset: 0

Views

Author

John Bibby, Sep 10 2021

Keywords

Crossrefs

Cf. A000312 (n^n), A056849 (mod 10), A174824.

Programs

  • Mathematica
    Table[PowerMod[n,n,100],{n,0,70}] (* Harvey P. Dale, Aug 13 2023 *)
  • Python
    def a(n): return pow(n, n, 100)
    print([a(n) for n in range(101)]) # Michael S. Branicky, Sep 26 2021

Formula

For n >= 101, a(n) = a(n-100), i.e., cyclic with period A174824(100) = 100, disregarding a(0). - Michael S. Branicky, Sep 26 2021
Previous Showing 11-15 of 15 results.