OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
digrev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
dcat:= proc(x, y) 10^(1+ilog10(y))*x+y end proc:
R:= 23: count:= 1: lastpp:= 3:
for d from 2 while count < 100 do
for i in [1, 3, 7, 9] while count < 100 do
for m from i*10^(d-1)+1 to (i+1)*10^(d-1)-1 while count < 100 do
for j from 0 to 9 while count < 100 do
x:= m*10^(d+1)+j*10^d+digrev(m);
if isprime(x) then
y:= dcat(lastpp, x);
lastpp:= x;
if isprime(y) then R:= R, y; count:= count+1 fi
fi
od od od od:
R; # Robert Israel, Apr 01 2021
MATHEMATICA
Select[FromDigits[Flatten[IntegerDigits/@#]]&/@Partition[Select[Prime[Range[ 110000]], PalindromeQ], 2, 1], PrimeQ] (* Harvey P. Dale, Mar 31 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited by Charles R Greathouse IV, Apr 28 2010
STATUS
approved