OFFSET
1,13
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(24) = 17 because 2*24 = 17+31 where 17 and 31 are emirps.
MAPLE
revdigs:= 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 r;
if not isprime(t) then return false fi;
r:= revdigs(t);
r <> t and isprime(r)
end proc:
N:= 1000: # for a(1)..a(N)
E:= select(filter, [seq(i, i=3..2*N, 2)]);
f:= proc(n) local i, j, w, t;
t:= 2*n;
j:= ListTools:-BinaryPlace(E, t);
i:= 1;
while i <= j do
w:= E[i]+E[j];
if w = t then return E[i]
elif w < t then i:=i+1
else j:= j-1
fi
od;
0
end proc:
map(f, [$1..N]);
CROSSREFS
KEYWORD
AUTHOR
J. M. Bergot and Robert Israel, Jun 10 2021
STATUS
approved