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.

A373387 Constant congruence speed of the tetration base n (in radix-10), or -1 if n is a multiple of 10.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 2, 1, 1, -1, 1, 1, 1, 1, 4, 1, 1, 2, 1, -1, 1, 1, 1, 2, 3, 2, 1, 1, 1, -1, 1, 2, 1, 1, 2, 1, 1, 1, 1, -1, 1, 1, 2, 1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 3, 1, 3, 1, 1, -1, 1, 1, 1, 1, 6, 1, 1, 3, 1, -1, 1, 1, 1, 2, 2, 2, 1, 1, 1, -1, 1, 2, 1
Offset: 0

Views

Author

Marco Ripà, Jun 02 2024

Keywords

Comments

It has been proved that this sequence contains arbitrarily large entries, while a(0) = a(1) = 0 by definition (given the fact that 0^0 = 1 is a reasonable choice and then 0^^b is 1 if b is even, whereas 0^^b is 0 if b is even). For any nonnegative integer n which is not a multiple of 10, a(n) is given by Equation (16) of the paper "Number of stable digits of any integer tetration" (see Links).
Moreover, a sufficient condition for having a constant congruence speed of any tetration base n, greater than 1 and not a multiple of 10, is that b >= 2 + v(n), where v(n) is equal to
u_5(n - 1) iff n == 1 (mod 5),
u_5(n^2 + 1) iff n == 2,3 (mod 5),
u_5(n + 1) iff n == 4 (mod 5),
u_2(n^2 - 1) - 1 iff n == 5 (mod 10)
(u_5 and u_2 indicate the 5-adic and the 2-adic valuation of the argument, respectively).
Therefore b >= n + 1 is always a sufficient condition for the constancy of the congruence speed (as long as n > 1 and n <> 0 (mod 10)).
As a trivial application of this property, we note that the constant congruence speed of the tetration 3^^b is 1 for any b > 1, while 3^3 is not congruent to 3 modulo 10. Thus, we can easily calculate the exact number of the rightmost digits of Graham’s number, G(64) (see A133613), that are the same of the homologous rightmost digits of 3^3^3^... since 3^3 is not congruent to 3 modulo 10, while the congruence speed of n = 3 is constant from height 2 (see A372490). This means that the last slog_3(G(64))-1 digits of G(64) are the same slog_3(G(64))-1 final digits of 3^3^3^..., whereas the difference between the slog_3(G(64))-th digit of G(64) and the slog_3(G(64))-th digit of 3^3^3^... is congruent to 6 modulo 10.
The constant congruence speed of tetration satisfies the following multiplicative constraint: for each pair (n_1, n_2) of nonnegative integers whose product is not divisible by 10, a(n_1*n_2) is necessarily greater than or equal to the minimum between a(n_1) and a(n_2) (see Equation 2.4 and Appendix of "A Compact Notation for Peculiar Properties Characterizing Integer Tetration" in Links). - Marco Ripà, Apr 26 2025

Examples

			a(3) = 1 since 3^^b := 3^3^3^... freezes 1 more rightmost digit for each unit increment of b, starting from b = 2.
		

References

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

Crossrefs

Programs

  • Python
    def v2(n):
        count = 0
        while n % 2 == 0 and n > 0:
            n //= 2
            count += 1
        return count
    def v5(n):
        count = 0
        while n % 5 == 0 and n > 0:
            n //= 5
            count += 1
        return count
    def V(a):
        mod_20 = a % 20
        mod_10 = a % 10
        if mod_20 == 1:
            return min(v2(a - 1), v5(a - 1))
        elif mod_20 == 11:
            return min(v2(a + 1), v5(a - 1))
        elif mod_10 in {2, 8}:
            return v5(a ** 2 + 1)
        elif mod_20 in {3, 7}:
            return min(v2(a + 1), v5(a ** 2 + 1))
        elif mod_20 in {13, 17}:
            return min(v2(a - 1), v5(a ** 2 + 1))
        elif mod_10 == 4:
            return v5(a + 1)
        elif mod_20 == 5:
            return v2(a - 1)
        elif mod_20 == 15:
            return v2(a + 1)
        elif mod_10 == 6:
            return v5(a - 1)
        elif mod_20 == 9:
            return min(v2(a - 1), v5(a + 1))
        elif mod_20 == 19:
            return min(v2(a + 1), v5(a + 1))
    def generate_sequence():
        sequence = []
        for a in range(1026):
            if a == 0 or a == 1:
                sequence.append(0)
            elif a % 10 == 0:
                sequence.append(-1)
            else:
                sequence.append(V(a))
        return sequence
    sequence = generate_sequence()
    print("a(0), a(1), a(2), ..., a(1025) =", ", ".join(map(str, sequence)))

Formula

a(n) = -1 iff n == 0 (mod 10), a(n) = 0 iff n = 1 or 2. Otherwise, a(n) >= 1 and it is given by Equation (16) from Ripà and Onnis.