OFFSET
1,1
MATHEMATICA
p = 2; mx = 0; lst = {}; While[p < 12500000000, m = (p - 1)/MultiplicativeOrder[10, p]; If[m > mx, mx = m; AppendTo[lst, p]; Print[{m, p}]]; p = NextPrime@ p]; lst
PROG
(Python)
from itertools import islice
from sympy import next_prime, n_order
def A243110_gen(): # generator of terms
p, c = 5, 2
yield 3
while p:=next_prime(p):
if p-1>c*(k:=n_order(10, p)):
c = (p-1)//k
yield int(p) # Chai Wah Wu, Jan 23 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Aug 20 2014
STATUS
approved