|
|
A075598
|
|
a(1) = 5 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).
|
|
8
|
|
|
5, 151, 11519, 2115193, 121151939, 21211519397, 4212115193971, 342121151939719, 43421211519397199, 2434212115193971993, 224342121151939719937, 122434212115193971993787, 51224342121151939719937871, 2512243421211519397199378719, 325122434212115193971993787197, 93251224342121151939719937871973
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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:
A[1]:= 5:
for n from 2 to 20 do
A[n]:= f(A[n-1])
od:
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|