OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 13 is in the sequence because both 13 and its reversal 31 are twin primes.
MAPLE
revdigs:= proc(n) local L, k;
L:= convert(n, base, 10);
add(L[-k]*10^(k-1), k=1..nops(L))
end proc:
Pr:= select(isprime, {seq(i, i=3..10^5, 2)}):
TL:= Pr intersect map(`-`, Pr, 2):
T:= TL union map(`+`, TL, 2):
sort(convert(select(t-> member(revdigs(t), T), T), list));
MATHEMATICA
tpQ[p_]:=PrimeQ[IntegerReverse[p]]&&AnyTrue[p+{2, -2}, PrimeQ]; Select[ Prime[ Range[1500]], tpQ[#]&&tpQ[IntegerReverse[#]]&] (* Harvey P. Dale, Jan 16 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Mar 11 2020
STATUS
approved