login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247351 Nearest prime to Pi*10^(n-1). 1
3, 31, 313, 3137, 31397, 314159, 3141601, 31415899, 314159257, 3141592661, 31415926541, 314159265359, 3141592653581, 31415926535879, 314159265358951, 3141592653589771, 31415926535897921, 314159265358979347, 3141592653589793239, 31415926535897932363 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Lim_{n->infinity} a(n)/10^(n-1) = Pi.

Demonstration: If gap_a(p) (resp. gap_b(p)) denotes the gap between a prime p and the next (resp. preceding) prime, we have by definition |Pi*10^(n-1)-a(n)| < max(gap_a(a(n)),gap_b(a(n)))/2. Now, it is known from results on prime gaps (e.g., Ingham, 1937) that gap_a(p) and gap_b(p) are O(p^theta) for some theta < 1; thus |Pi*10^(n-1)-a(n)| = O(a(n)^theta) and the result.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..300

MAPLE

a:= proc(n) local f, h, p, q; Digits:= 20+n;

      f:= evalf(Pi*10^(n-1)); h:= round(f);

      if isprime(h) then return h fi;

      p:= prevprime(h); q:= nextprime(h);

      `if`(f-p < q-f, p, q)

    end:

seq(a(n), n=1..30);  # Alois P. Heinz, Sep 24 2014

MATHEMATICA

a[n_]:=If[10^(n-1)*Pi<1/2(NextPrime[10^(n-1)*Pi, -1]+NextPrime[10^(n-1)*Pi]), NextPrime[10^(n-1)*Pi, -1], NextPrime[10^(n-1)*Pi]]; Table[a[n], {n, 20}] (* Farideh Firoozbakht, Sep 18 2014, Sep 24 2014 *)

CROSSREFS

Cf. A000796 (Pi).

Sequence in context: A111137 A037785 A037589 * A089289 A011545 A011546

Adjacent sequences:  A247348 A247349 A247350 * A247352 A247353 A247354

KEYWORD

nonn,changed

AUTHOR

Jean-Christophe Hervé, Sep 18 2014

EXTENSIONS

More terms from Farideh Firoozbakht, Sep 18 2014

a(15)-a(20) from Alois P. Heinz, Sep 24 2014

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 September 21 07:08 EDT 2019. Contains 327253 sequences. (Running on oeis4.)