OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
MAPLE
q:= n-> isprime(n) and (l-> (d-> d<9 and isprime(add(l[i]*
(d+1)^(i-1), i=1..nops(l))))(max(l)))(convert(n, base, 10)):
select(q, [$1..2000])[]; # Alois P. Heinz, Jan 27 2023
MATHEMATICA
q[p_] := Module[{d = IntegerDigits[p], b}, b = Max[d] + 1; b <= 9 && PrimeQ[FromDigits[d, b]]]; Select[Prime[Range[250]], q] (* Amiram Eldar, Jan 27 2023 *)
PROG
(Python)
from sympy import isprime
def ok(n):
if not isprime(n): return False
s = str(n)
b = int(max(s)) + 1
return b != 10 and isprime(int(s, b))
print([k for k in range(1600) if ok(k)]) # Michael S. Branicky, Jan 27 2023
(PARI) isok(p)=if(isprime(p), my(v=digits(p), b=vecmax(v)+1); b<10 && isprime(fromdigits(v, b)), 0) \\ Andrew Howroyd, Jan 27 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alfred Jacob Mohan, Jan 27 2023
EXTENSIONS
More terms from Michael S. Branicky, Jan 27 2023
STATUS
approved