OFFSET
1,1
COMMENTS
Terms > 83 have an odd number of digits and an even first digit.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..5743 (terms <= 10^15)
David A. Corneth, PARI program
EXAMPLE
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 *)
PROG
(PARI) \\ See PARI link
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Nov 30 2023
STATUS
approved