This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A075595 #8 Aug 28 2018 16:00:30 %S A075595 127,131,151,173,1117,2131,1171,1193,1231,1291,1319,1373,2411,1433, %T A075595 1471,1531,1597,1613,2671,2711,1733,2791,1831,2897,1973,21011,21031, %U A075595 11071,11093,11131,11273,11311,21377,11393,11491,11519,11579,11633 %N A075595 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. %C A075595 For small primes, the prefix required is usually 1 or 2. %H A075595 Robert Israel, <a href="/A075595/b075595.txt">Table of n, a(n) for n = 1..10000</a> %p A075595 f:= proc(n) local m,d,d1,v,x,y,y0,z,found; %p A075595 m:= ilog10(n); %p A075595 v:= infinity; %p A075595 for d from 2 do %p A075595 for d1 from 1 to d-1 do %p A075595 found:= false; %p A075595 for x from 10^(d1-1) to 10^d1-1 while not found do %p A075595 if d-d1=1 then y0:= 1 else y0:= 10^(d-d1-1)+1 fi; %p A075595 for y from y0 to 10^(d-d1)-1 by 2 do %p A075595 z:= y+10^(d-d1)*n + 10^(d-d1+m+1)*x; %p A075595 if isprime(z) then v:= min(v,z); found:= true; break fi %p A075595 od od; %p A075595 od; %p A075595 if v < infinity then return v fi %p A075595 od %p A075595 end proc: %p A075595 map(f@ithprime, [$1..100]); # _Robert Israel_, Aug 28 2018 %Y A075595 Cf. A075596, A075597, A075598, A075599, A075600, A075601, A075602. %K A075595 base,nonn %O A075595 1,1 %A A075595 _Amarnath Murthy_, Sep 28 2002 %E A075595 Corrected and extended by _Sascha Kurz_, Jan 20 2003