login
A393520
Primes p such that the reversal of p^2 is the square of a prime.
1
2, 3, 11, 13, 31, 101, 113, 307, 311, 1021, 1031, 1103, 1201, 1301, 3011, 11003, 30011, 110221, 111211, 112111, 122011, 1000211, 1001003, 1010201, 1020101, 1100311, 1101103, 1101211, 1102111, 1111021, 1112011, 1120001, 1121011, 1130011, 1201111, 3001001, 3011011, 10002121, 10011101, 10012001
OFFSET
1,1
COMMENTS
The first two terms that are not in A085306 are a(8) = 307 and a(55) = 30001253.
The first two terms p such that the square root of the reversal of p^2 is neither p nor the reversal of p are a(69) = 110092211 and a(81) = 112191011 (whose squares are each other's reversals).
For n>1, the first decimal digit of a(n)^2 is either 1 or 9. - Chai Wah Wu, Apr 07 2026
EXAMPLE
a(5) = 31 is a term because 31^2 = 961 whose reversal 169 = 13^2, and 13 is prime.
MAPLE
filter:= proc(p) local r;
if not isprime(p) then return false fi;
r:= rev(p^2);
issqr(r) and isprime(sqrt(r))
end proc:
select(filter, [2, seq(i, i=3..2*10^6, 2)]);
MATHEMATICA
Select[Prime[Range[10^5]], PrimeQ[Sqrt[IntegerReverse[#^2]]] &] (* Stefano Spezia, Apr 05 2026 *)
PROG
(PARI) isok(p) = if (isprime(p), my(r = fromdigits(Vecrev(digits(p^2)))); issquare(r) && isprime(sqrtint(r))); \\ Michel Marcus, Apr 05 2026
(Python)
from itertools import count, islice
from math import isqrt
from sympy import primerange, integer_nthroot, isprime
def A393520_gen(): # generator of terms
yield 2
for l in count(0):
for p in primerange(isqrt(m:=10**l)+1, isqrt((m<<1)-1)+1):
q, r = integer_nthroot(int(str(p**2)[::-1]), 2)
if r and isprime(q):
yield p
for p in primerange(isqrt(9*m), isqrt(10*m-1)+1):
q, r = integer_nthroot(int(str(p**2)[::-1]), 2)
if r and isprime(q):
yield p
A393520_list = list(islice(A393520_gen(), 40)) # Chai Wah Wu, Apr 07 2026
CROSSREFS
Cf. A085306. Contains A065378.
Sequence in context: A235632 A085306 A161322 * A123239 A048891 A215358
KEYWORD
nonn,base
AUTHOR
Robert Israel, Apr 05 2026
STATUS
approved