login
A111382
Beginning with 3, least number such that concatenation of first n terms and its digit reversal both are primes.
3
3, 1, 1, 21, 11, 43, 47, 157, 753, 51, 917, 273, 2409, 703, 413, 3729, 1153, 6243, 8789, 2307, 4477, 137, 403, 10649, 4617, 4533, 6133, 4721, 877, 2469, 5967, 1557, 1047, 38931, 15533, 6877, 23987, 4767, 18049, 1463, 118333, 27897
OFFSET
1,1
LINKS
MAPLE
rev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc;
R:= 3: X:= 3: XR:= 3:
for i from 2 to 50 do
for x from 1 by 2 do
d:= 1+ilog10(x);
t:= X*10^(1+ilog10(x)) + x;
if not isprime(t) then next fi;
xr:= rev(x);
tr:= XR+xr*10^(1+ilog10(XR));
if isprime(tr) then break fi;
od;
X:= t; XR:= tr; R:= R, x;
od:
R; # Robert Israel, Aug 09 2023
CROSSREFS
Cf. A113584.
Sequence in context: A121412 A212855 A016561 * A173884 A176418 A156950
KEYWORD
nonn,base
AUTHOR
Hans Havermann, Nov 08 2005
STATUS
approved