OFFSET
0,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
FORMULA
a(n) = 10^n + A117190(n).
MAPLE
a:= n-> (t->((p, q)->`if`(q-t<t-p, q, p))(`if`(t=1, -1,
prevprime(t)), nextprime(t)))(10^n):
seq(a(n), n=0..25); # Alois P. Heinz, Aug 13 2014
MATHEMATICA
Table[Min[Nearest[{NextPrime[10^n], NextPrime[10^n, -1]}, 10^n]], {n, 0, 20}] (* Harvey P. Dale, Mar 14 2023 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Mar 01 2006
EXTENSIONS
More terms from Giovanni Resta and Rick L. Shepherd, Mar 01 2006
STATUS
approved