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 A115062 #17 Mar 14 2023 11:23:21 %S A115062 2,11,101,997,10007,100003,1000003,9999991,100000007,1000000007, %T A115062 10000000019,100000000003,999999999989,9999999999971,99999999999973, %U A115062 999999999999989,10000000000000061,99999999999999997,1000000000000000003,9999999999999999961 %N A115062 Prime nearest to 10^n. In case of a tie, choose the smaller. %H A115062 Alois P. Heinz, <a href="/A115062/b115062.txt">Table of n, a(n) for n = 0..300</a> %F A115062 a(n) = 10^n + A117190(n). %p A115062 a:= n-> (t->((p, q)->`if`(q-t<t-p, q, p))(`if`(t=1, -1, %p A115062 prevprime(t)), nextprime(t)))(10^n): %p A115062 seq(a(n), n=0..25); # _Alois P. Heinz_, Aug 13 2014 %t A115062 Table[Min[Nearest[{NextPrime[10^n],NextPrime[10^n,-1]},10^n]],{n,0,20}] (* _Harvey P. Dale_, Mar 14 2023 *) %o A115062 (PARI) for(n=0, 20, a=10^n-precprime(10^n); b=nextprime(10^n)-10^n; if(a<=b && n!=0, print1(precprime(10^n), ", "), print1(nextprime(10^n), ", "))) \\ _Felix Fröhlich_, Aug 13 2014 %Y A115062 Cf. A003617, A003618, A117190. %K A115062 nonn %O A115062 0,1 %A A115062 _Lekraj Beedassy_, Mar 01 2006 %E A115062 More terms from _Giovanni Resta_ and _Rick L. Shepherd_, Mar 01 2006