OFFSET
0,2
COMMENTS
Possible bases are those greater than the largest decimal digit of n.
For n >= 7, a(n) must end in 1.
EXAMPLE
a(3) = 65 because 65_7 = 47, 65_8 = 53 and 65_9 = 59 are prime but 65_10 = 65 is composite.
MAPLE
f:= proc(n) local L, x, i, b;
L:= convert(n, base, 10);
b:= max(L);
for i from 0 do
b:= b+1;
x:= add(L[i]*b^(i-1), i=1..nops(L));
if not isprime(x) then return i fi;
od
end proc:
V:= Array(0..9): V[0]:= 1: count:= 1:
for n from 10 while count < 10 do
v:= f(n);
if V[v] = 0 then V[v]:= n; count:= count+1; fi;
od:
convert(V, list);
PROG
(Python)
from gmpy2 import is_prime, mpz
def A373693(n): # assumes n <= 51
for k in count(1):
c = max(map(int, s:=str(k)))+1
if all(is_prime(mpz(s, b)) for b in range(c, c+n)) and not is_prime(mpz(s, c+n)):
return k # Chai Wah Wu, Aug 05 2024
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Robert Israel, Aug 03 2024
EXTENSIONS
a(11)-a(12) from Michael S. Branicky, Aug 04 2024
STATUS
approved