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

A349425 n-th stable digit (in decimal system) of n^(n^(...^n)).

Original entry on oeis.org

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

Views

Author

Marco Ripà, Nov 17 2021

Keywords

Comments

The integer tetration (or hyper-4) n^^b is characterized by a well-known property involving its rightmost digits (as b grows an increasing number of the rightmost digits of n^^b are frozen - following the general rule described by Equation (16) of the linked paper "Number of stable digits of any integer tetration", p. 454).
In 2011 Ripà conjectured that, for any n >= 1, if b >= n + 2, then the n rightmost digits of n^^b are stable.
The above-mentioned paper, published in 2022, proved that this conjecture is true and also stated the stronger sufficient condition that the height of the hyperexponent is greater than or equal to tilde(v(a)) + 2, where tilde(v(a)) := v_5(a - 1) iff a == 1 (mod 5), v_5(a^2 + 1) iff a == {2, 3} (mod 5), v_5(a + 1) iff a == 4 (mod 5), v_2(a^2 - 1) - 1 iff a == 5 (mod 10), where v_2(x) = A007814(x) and v_5(x) = A112765(x) are the 2-adic and 5-adic valuations of x, respectively. - Marco Ripà, Jul 24 2024

Examples

			For n = 3, a(3) = 3 since 3^^5 == 387(mod 10^3). Thus, (387(mod 10^3) - 387(mod 10^2))/10^2 = 3.
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011. ISBN 978-88-6178-789-6.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local m, v, w; m, w:= 10^n, n;
          do v:= n&^w mod m; if w=v then return v else w:=v fi od
        end:
    a:= n-> `if`(irem(n, 10)=0, 0, iquo(b(n), 10^(n-1))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 17 2021
  • Python
    def A349425(n):
        if n % 10 == 0: return 0
        m, n1, n2 = n, 10**n, 10**(n-1)
        while (k := pow(n,m,n1)) != m: m = k
        return k//n2 # Chai Wah Wu, Dec 19 2021

Formula

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

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Periodic sequence with period 10.

Crossrefs

Cf. A002489, A120962, A364789 (initial digit).

Programs

  • Mathematica
    Table[PowerMod[n^n, n, 10], {n, 200}]
  • PARI
    a(n)=n%=10; lift(Mod(n,10)^n^n) \\ Charles R Greathouse IV, Dec 27 2013
    
  • Python
    def A229522(n): return (0, 1, 6, 3, 6, 5, 6, 7, 6, 9)[n%10] # Chai Wah Wu, Aug 10 2023

Formula

a(n) = A120962(A002489(n)). - Michel Marcus, Aug 09 2023

A229784 a(n) = (1^1^1 + 2^2^2 . . . + n^n^n) mod 10.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The last digit of 1^1^1 + 2^2^2 +...+ n^n^n, which has period 100.
Sum of A120962 mod 10. - T. D. Noe, Sep 30 2013

Crossrefs

Programs

  • Mathematica
    Table[Mod[Sum[PowerMod[i, i^i, 10], {i, 1, n}], 10], {n, 200}]
    Mod[Accumulate[Table[PowerMod[i, i^i, 10], {i, 100}]], 10] (* T. D. Noe, Sep 30 2013 *)
  • PARI
    a(n)=lift(sum(k=1,n%100,Mod(k,10)^k^k)) \\ Charles R Greathouse IV, Dec 27 2013
    
  • Python
    from itertools import count, accumulate, islice
    def A229784_gen(): # generator of terms
        yield from accumulate((pow(k,k**k,10) for k in count(1)),func=lambda x,y:(x+y)%10)
    A229784_list = list(islice(A229784_gen(),40)) # Chai Wah Wu, Jun 17 2022

Extensions

a(0)=0 prepended by Alois P. Heinz, Jun 17 2022

A365689 Final decimal digit of n^((n+1)^(n+2)) = A030198(n).

Original entry on oeis.org

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

Views

Author

Marco Ripà, Sep 16 2023

Keywords

Comments

Period 10, repeat: [0, 1, 2, 1, 4, 5, 6, 1, 8, 1].

Examples

			For n = 2, a(2) = 2417851639229258349412352 mod 10 = 2.
		

Crossrefs

Cf. A030198, A103562, A120962, A365689 (initial digit).

Programs

  • Mathematica
    PadRight[{},100,{0,1,2,1,4,5,6,1,8,1}] (* Paolo Xausa, Oct 16 2023 *)
  • PARI
    a(n) = lift(Mod(n, 10)^((n+1)^(n+2))); \\ Michel Marcus, Sep 16 2023
    
  • Python
    def A365689(n): return pow(n,(n+1)**(n+2),10) # Chai Wah Wu, Sep 22 2023

Formula

a(n) = n^((n+1)^(n+2)) mod 10.
a(n) = A103562(n) for n >= 4 (as 3^(2^1) == 9 (mod 10) instead of 1).
G.f.: x*(x^8+8*x^7+x^6+6*x^5+5*x^4+4*x^3+x^2+2*x+1)/(1-x^10). - Alois P. Heinz, Apr 18 2025

A365935 Final digit (in decimal system) of n^(n+1) = A007778(n).

Original entry on oeis.org

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, 2, 1, 0, 1, 8, 1, 4, 5, 6
Offset: 0

Views

Author

Marco Ripà, Sep 23 2023

Keywords

Comments

This is a periodic sequence (1, 8, 1, 4, 5, 6, 1, 8, 1, 0, 1, 2, 9, 4, 5, 6, 9, 2, 1, 0) with period 20 (which is twice the base).

Examples

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

Crossrefs

Programs

  • Mathematica
    a[n_]:=Last[IntegerDigits[n^(n+1)]]; Array[a,87,0] (* Stefano Spezia, Sep 26 2023 *)
  • PARI
    a(n) = lift(Mod(n, 10)^(n+1)); \\ Michel Marcus, Sep 23 2023

Formula

a(n) = n^(n+1) mod 10.
a(n) = A010879(A007778(n)).
a(n) = A365936(n+10).

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).
Showing 1-6 of 6 results.