OFFSET
1,1
COMMENTS
For small primes, the prefix required is usually 1 or 2.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local m, d, d1, v, x, y, y0, z, found;
m:= ilog10(n);
v:= infinity;
for d from 2 do
for d1 from 1 to d-1 do
found:= false;
for x from 10^(d1-1) to 10^d1-1 while not found do
if d-d1=1 then y0:= 1 else y0:= 10^(d-d1-1)+1 fi;
for y from y0 to 10^(d-d1)-1 by 2 do
z:= y+10^(d-d1)*n + 10^(d-d1+m+1)*x;
if isprime(z) then v:= min(v, z); found:= true; break fi
od od;
od;
if v < infinity then return v fi
od
end proc:
map(f@ithprime, [$1..100]); # Robert Israel, Aug 28 2018
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 28 2002
EXTENSIONS
Corrected and extended by Sascha Kurz, Jan 20 2003
STATUS
approved