OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
R:= NULL: count:= 0: p:= 2:
while count < 100 do
p:= nextprime(p);
if convert(convert(p^2, base, 10), set) subset convert(convert(p, base, 10), set) then
count:= count+1; R:= R, p
fi
od:
R; # Robert Israel, Nov 01 2023
PROG
(Python)
from sympy import isprime
def ok(n): return isprime(n) and set(str(n)) >= set(str(n**2))
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Nov 01 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Offset corrected by Robert Israel, Nov 01 2023
STATUS
approved