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

%I #32 Dec 27 2024 13:04:07

%S 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,

%T 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,

%U 1,1,3,1,-1,1,1,1,2,2,2,1,1,1,-1,1,2,1

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

%C 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).

%C 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

%C u_5(n - 1) iff n == 1 (mod 5),

%C u_5(n^2 + 1) iff n == 2,3 (mod 5),

%C u_5(n + 1) iff n == 4 (mod 5),

%C u_2(n^2 - 1) - 1 iff n == 5 (mod 10)

%C (u_5 and u_2 indicate the 5-adic and the 2-adic valuation of the argument, respectively).

%C 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)).

%C 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.

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

%H Marco Ripà, <a href="https://doi.org/10.7546/nntdm.2020.26.3.245-260">On the constant congruence speed of tetration</a>, Notes on Number Theory and Discrete Mathematics, Volume 26, 2020, Number 3, Pages 245—260.

%H Marco Ripà, <a href="https://doi.org/10.7546/nntdm.2021.27.4.43-61">The congruence speed formula</a>, Notes on Number Theory and Discrete Mathematics, 2021, 27(4), 43—61.

%H Marco Ripà, <a href="https://www.researchgate.net/publication/387314761_Twelve_Python_Programs_to_Help_Readers_Test_Peculiar_Properties_of_Integer_Tetration">Twelve Python Programs to Help Readers Test Peculiar Properties of Integer Tetration</a>, ResearchGate, 2024. See pp. 22-23, 27.

%H Marco Ripà and Luca Onnis, <a href="https://doi.org/10.7546/nntdm.2022.28.3.441-457">Number of stable digits of any integer tetration</a>, Notes on Number Theory and Discrete Mathematics, 2022, 28(3), 441—457.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Graham&#39;s_number">Graham's Number</a>.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Tetration">Tetration</a>.

%F 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.

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

%o (Python)

%o def v2(n):

%o count = 0

%o while n % 2 == 0 and n > 0:

%o n //= 2

%o count += 1

%o return count

%o def v5(n):

%o count = 0

%o while n % 5 == 0 and n > 0:

%o n //= 5

%o count += 1

%o return count

%o def V(a):

%o mod_20 = a % 20

%o mod_10 = a % 10

%o if mod_20 == 1:

%o return min(v2(a - 1), v5(a - 1))

%o elif mod_20 == 11:

%o return min(v2(a + 1), v5(a - 1))

%o elif mod_10 in {2, 8}:

%o return v5(a ** 2 + 1)

%o elif mod_20 in {3, 7}:

%o return min(v2(a + 1), v5(a ** 2 + 1))

%o elif mod_20 in {13, 17}:

%o return min(v2(a - 1), v5(a ** 2 + 1))

%o elif mod_10 == 4:

%o return v5(a + 1)

%o elif mod_20 == 5:

%o return v2(a - 1)

%o elif mod_20 == 15:

%o return v2(a + 1)

%o elif mod_10 == 6:

%o return v5(a - 1)

%o elif mod_20 == 9:

%o return min(v2(a - 1), v5(a + 1))

%o elif mod_20 == 19:

%o return min(v2(a + 1), v5(a + 1))

%o def generate_sequence():

%o sequence = []

%o for a in range(1026):

%o if a == 0 or a == 1:

%o sequence.append(0)

%o elif a % 10 == 0:

%o sequence.append(-1)

%o else:

%o sequence.append(V(a))

%o return sequence

%o sequence = generate_sequence()

%o print("a(0), a(1), a(2), ..., a(1025) =", ", ".join(map(str, sequence)))

%Y Cf. A067251, A133613, A317824, A317903, A317905, A349425, A370211, A370775, A371129, A371671, A372490.

%Y Cf. A000007, A018247, A018248, A063006, A091661, A091663, A091664, A120817, A120818, A290372, A290373, A290374, A290375.

%K sign,base

%O 0,6

%A _Marco Ripà_, Jun 02 2024