OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..125
EXAMPLE
a(5) = 101 because 101103107109113 = A086041(6) is the smallest emirp formed by concatenating 5 consecutive primes (101, 103, 107, 109, 113).
MAPLE
f:= proc(n) local L, p, a, i, d, flag, x, y;
L:= [seq(ithprime(i), i=1..n)];
do
d:= ilog10(L[2]);
a:= floor(L[2]/10^d);
flag:= true;
if member(a, {2, 6, 8}) then p:= nextprime((a+1)*10^d)
elif member(a, {4, 5}) then p:= nextprime(7*10^d)
else flag:= false
fi;
if flag then
L:= p; for i from 1 to n-1 do p:= nextprime(p); L:= L, p od;
L:= [L]
else
L:= [op(L[2..-1]), nextprime(L[-1])]
fi;
x:= lcat(L);
if isprime(x) then
y:= rev(x);
if isprime(y) and y <> x then return L[1] fi;
fi
od
end proc:
f(1):= 13:
map(f, [$1..50]); # Robert Israel, May 19 2026
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Feb 18 2010
EXTENSIONS
Keyword:base added and definition reworded by R. J. Mathar, Feb 24 2010
More terms from Sean A. Irvine, Nov 14 2010
STATUS
approved
