OFFSET
2,1
LINKS
Robert Israel, Table of n, a(n) for n = 2..200
MAPLE
revdigs:= proc(x) local L, i; L:= convert(x, base, 10); add(L[-i]*10^(i-1), i=1..nops(L)) end proc:
f:= proc(n)
local d, a, B, r;
for d from floor(n/2) by -1 do
B:= (10^d-1)*(1+10^(n-d));
for a from 10^(n-2*d)-1 to 1 by -1 do
r:= revdigs(a);
if r > a and isprime(B+10^d*a) and isprime(B+10^d*r) then return B+10^d*a fi
od
od
end proc:
map(f, [$2..20]); # Robert Israel, Aug 16 2016
MATHEMATICA
Do[ p = NextPrime[10^(n ), -1 ]; Do[ p1 = FromDigits[ Reverse[IntegerDigits[p]]]; If[PrimeQ[p1] && p1 > p, Print[{n, p}]; Break[]]; p = NextPrime[p, -1], {10^9}], {n, 2, 15}];
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Nov 20 2008
EXTENSIONS
More terms from Max Alekseyev, May 03 2011
STATUS
approved