[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a075600 -id:a075600
     Sort: relevance | references | number | modified | created      Format: long | short | data
Smallest prime that is obtained by placing digits on both sides of the n-th prime. Or smallest prime that encompasses the n-th prime.
+10
11
127, 131, 151, 173, 1117, 2131, 1171, 1193, 1231, 1291, 1319, 1373, 2411, 1433, 1471, 1531, 1597, 1613, 2671, 2711, 1733, 2791, 1831, 2897, 1973, 21011, 21031, 11071, 11093, 11131, 11273, 11311, 21377, 11393, 11491, 11519, 11579, 11633
OFFSET
1,1
COMMENTS
For small primes, the prefix required is usually 1 or 2.
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:
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
a(1) = 3 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).
+10
8
3, 131, 11311, 3113111, 231131111, 22311311119, 3223113111199, 132231131111993, 11322311311119931, 7113223113111199313, 171132231131111993137, 31711322311311119931373, 3317113223113111199313733
OFFSET
1,1
MATHEMATICA
NestList[Select[Flatten[Table[FromDigits[Join[{a}, IntegerDigits[#], {b}]], {a, 9}, {b, 1, 9, 2}]], PrimeQ][[1]]&, 3, 12] (* Harvey P. Dale, Nov 11 2022 *)
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 28 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 20 2003
One more term from David Wasserman, Jan 20 2005
STATUS
approved
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).
+10
8
5, 151, 11519, 2115193, 121151939, 21211519397, 4212115193971, 342121151939719, 43421211519397199, 2434212115193971993, 224342121151939719937, 122434212115193971993787, 51224342121151939719937871, 2512243421211519397199378719, 325122434212115193971993787197, 93251224342121151939719937871973
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:
seq(A[n], n=1..20); # Robert Israel, Aug 28 2018
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 28 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 20 2003
Terms a(13) and beyond from Robert Israel, Aug 28 2018
STATUS
approved
a(1) = 2 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).
+10
7
2, 127, 11273, 1112731, 411127319, 34111273199, 3341112731993, 233411127319933, 32334111273199339, 3323341112731993391, 633233411127319933919, 66332334111273199339193, 1663323341112731993391937
OFFSET
1,1
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 28 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 20 2003
One more term from David Wasserman, Jan 20 2005
STATUS
approved
a(1) = 7 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).
+10
7
7, 173, 11731, 2117317, 421173173, 34211731733, 1342117317337, 813421173173377, 28134211731733771, 4281342117317337713, 142813421173173377131, 21428134211731733771317, 2214281342117317337713171, 2221428134211731733771317113, 922214281342117317337713171139
OFFSET
1,1
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 28 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 20 2003
Further terms from Ray G. Opao, Nov 26 2004
STATUS
approved
a(1) = 13 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).
+10
7
13, 2131, 121313, 51213137, 3512131379, 135121313797, 21351213137977, 5213512131379777, 352135121313797771, 63521351213137977713, 16352135121313797771319, 9163521351213137977713193
OFFSET
1,1
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 28 2002
EXTENSIONS
Corrected and extended by Sascha Kurz, Jan 23 2003
STATUS
approved
a(1) = 17 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).
+10
7
17, 1171, 211711, 32117117, 6321171179, 263211711799, 42632117117999, 6426321171179993, 564263211711799931, 15642632117117999311, 1156426321171179993119, 311564263211711799931199
OFFSET
1,1
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 28 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 23 2003
STATUS
approved

Search completed in 0.005 seconds