login
A030083
Primes p such that all digits of p^2 appear in p.
2
1049, 17923, 49261, 81619, 94583, 100469, 100549, 102953, 107251, 110923, 125789, 149827, 184903, 256169, 279863, 285101, 289573, 298327, 370421, 406951, 459521, 471923, 472963, 492671, 493621, 497521, 499423, 502261, 504821, 569423, 582139, 597823, 631927
OFFSET
1,1
LINKS
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
Contains A050288.
Cf. A030084.
Sequence in context: A164771 A031600 A251272 * A184203 A015064 A090057
KEYWORD
nonn,base
EXTENSIONS
Offset corrected by Robert Israel, Nov 01 2023
STATUS
approved