A367796 Primes p such that the sum of p and its reversal is the square of a prime.
2, 29, 47, 83, 20147, 23117, 24107, 63113, 80141, 81131, 261104399, 262005299, 262104299, 262203299, 263302199, 264203099, 264302099, 264500099, 270401489, 271500389, 273104189, 273302189, 274401089, 282203279, 284302079, 284500079, 291104369, 291203369, 292005269, 293005169, 293104169, 294302069
Offset: 1
Examples
A056964(a(n)) = 121 = 11^2 for 2 <= n <= 4. A056964(a(n)) = 94249 = 307^2 for 5 <= n <= 10. A056964(a(n)) = 1254505561 = 35419^2 for 11 <= n <= 71.
Links
- David A. Corneth, Table of n, a(n) for n = 1..5743 (terms <= 10^15)
- David A. Corneth, PARI program
Programs
-
Maple
digrev:= proc(n) local L,i; L:= convert(n,base,10); add(L[-i]*10^(i-1),i=1..nops(L)) end proc: filter:= proc(t) local v; v:= sqrt(t+digrev(t)); v::integer and isprime(v) end proc: R:= 2, 29, 47, 83: count:= 4: flag:= true: for d from 3 to 9 by 2 do p:= prevprime(10^(d-1)); for i from 1 do p:= nextprime(p); p1:= floor(p/10^(d-1)); if p1::odd then p:= nextprime((p1+1)*10^(d-1)) fi; if p > 10^d then break fi; if filter(p) then count:= count+1; R:= R,p; fi od od: R;
-
Mathematica
Select[Prime[Range[10^6]], PrimeQ[Sqrt[#+FromDigits[Reverse[IntegerDigits[#]]]]] &] (* Stefano Spezia, Dec 10 2023 *)
-
PARI
\\ See PARI link
Comments