OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..8096
MAPLE
listtoint:= proc(L) local i; add(L[i]*10^(i-1), i=1..nops(L)) end proc:
f:= proc(L) local s;
s:= listtoint(L);
if isprime(s) and isprime(listtoint(ListTools:-Reverse(L))) then s fi
end proc:
Cands:= [[3], [7]]:
A:= 2, 3, 5, 7:
for m from 2 to 6 do
Cands:= map(t -> seq([op(t), j], j=[2, 3, 5, 7]), Cands);
A:= A, op(sort(map(f, Cands)));
od:
A; # Robert Israel, Dec 04 2015
MATHEMATICA
okQ[p_] := PrimeQ[IntegerReverse[p] && AllTrue[IntegerDigits[p], PrimeQ]];
Select[Prime[Range[10^4]], okQ] (* Jean-François Alcover, Feb 06 2018 *)
PROG
(Magma) [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [2, 3, 5, 7] and IsPrime(Seqint(Reverse(Intseq(p))))]; // Vincenzo Librandi, Dec 04 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Jan 24 2010
STATUS
approved