OFFSET
0,6
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.
REFERENCES
Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011. ISBN 978-88-6178-789-6.
LINKS
Marco Ripà, On the constant congruence speed of tetration, Notes on Number Theory and Discrete Mathematics, Volume 26, 2020, Number 3, Pages 245—260.
Marco Ripà, The congruence speed formula, Notes on Number Theory and Discrete Mathematics, 2021, 27(4), 43—61.
Marco Ripà, Twelve Python Programs to Help Readers Test Peculiar Properties of Integer Tetration, ResearchGate, 2024. See pp. 22-23, 27.
Marco Ripà and Luca Onnis, Number of stable digits of any integer tetration, Notes on Number Theory and Discrete Mathematics, 2022, 28(3), 441—457.
Wikipedia, Graham's Number.
Wikipedia, Tetration.
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.
EXAMPLE
a(3) = 1 since 3^^b := 3^3^3^... freezes 1 more rightmost digit for each unit increment of b, starting from b = 2.
PROG
(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)))
CROSSREFS
KEYWORD
sign,base
AUTHOR
Marco Ripà, Jun 02 2024
STATUS
approved