login
A387665
Smallest nonnegative integer coprime to 5 with a constant congruence speed >= n (see A373387 for the definition of "constant congruence speed").
0
1, 2, 7, 57, 182, 1068, 1068, 32318, 280182, 280182, 3626068, 23157318, 120813568, 1097376068, 1097376068, 11109655182, 49925501068, 355101282318, 355101282318, 15613890344818, 15613890344818, 365855836217682, 2273204469030182, 2273204469030182, 49956920289342682
OFFSET
0,2
COMMENTS
For the definition of "constant congruence speed", see Def. 1.2 (and also Def. 1.1) of "Number of stable digits of any integer tetration" in Links. For all positive integers > 1 and not a multiple of 10, this corresponds to A373387, and the present sequence can be easily derived from A337833.Furthermore, for any n >= 4, all the a(n) are necessarily congruent to 2 or 8 modulo 10 (the proof that no a(n) can end in 4 or 6 easily follows from Theorem 2.1 of "Number of stable digits of any integer tetration" in Links).
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à, The congruence speed formula, Notes on Number Theory and Discrete Mathematics, 2021, 27(4), 43-61.
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.
FORMULA
a(n) = min_{k >= n} A337833(k).
EXAMPLE
For n = 5, a(5) = 1068 is the smallest base (radix-10) of the tetration m^^m which is characterized by a congruence speed of at least 5 (in particular, 1068 has a constant congruence speed of 6).
PROG
(Python)
def vp(n, p):
c=0
while n%p==0:
n//=p
c+=1
return c
def V(a):
if a%10==0 or a==1:
return 0
r=a%20
if r==1:
return min(vp(a-1, 2), vp(a-1, 5))
if r==11:
return min(vp(a+1, 2), vp(a-1, 5))
if a%10 in(2, 8):
return vp(a*a+1, 5)
if r in(3, 7):
return min(vp(a+1, 2), vp(a*a+1, 5))
if r in(13, 17):
return min(vp(a-1, 2), vp(a*a+1, 5))
if a%10==4:
return vp(a+1, 5)
if r==5:
return vp(a-1, 2)
if r==15:
return vp(a+1, 2)
if a%10==6:
return vp(a-1, 5)
if r==9:
return min(vp(a-1, 2), vp(a+1, 5))
if r==19:
return min(vp(a+1, 2), vp(a+1, 5))
return 0
def seq():
s=[]
m=1
while True:
if m%5!=0:
t=V(m)
while len(s)<=t:
s.append(None)
for k in range(t+1):
if s[k] is None:
s[k]=m
print(m)
m+=1
seq()
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marco Ripà, Oct 04 2025
STATUS
approved