login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115062 Prime nearest to 10^n. In case of a tie, choose the smaller. 2
2, 11, 101, 997, 10007, 100003, 1000003, 9999991, 100000007, 1000000007, 10000000019, 100000000003, 999999999989, 9999999999971, 99999999999973, 999999999999989, 10000000000000061, 99999999999999997, 1000000000000000003, 9999999999999999961 (list; graph; refs; listen; history; text; internal format)
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

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

Cf. A003617, A003618, A117190.

Sequence in context: A090726 A036953 A254320 * A062397 A158578 A003617

Adjacent sequences:  A115059 A115060 A115061 * A115063 A115064 A115065

KEYWORD

nonn

AUTHOR

Lekraj Beedassy, Mar 01 2006

EXTENSIONS

More terms from Giovanni Resta and Rick L. Shepherd, Mar 01 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 26 01:48 EST 2020. Contains 331270 sequences. (Running on oeis4.)