Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A120843
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A120843 Initial digit of the (10^n)-th prime. +0
1
2, 2, 5, 7, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 (list; graph; listen)
OFFSET

0,1

COMMENT

The algorithm in the PARI program approximates the (10^n)-th prime to an accuracy of roughly n/2 + 1 digits. As a result, we are almost certain to get the initial digit correctly. It remains to prove this. Since the Riemann approximation of Pi(x) is used as a boundary in the exponential bisection routine, it would seem that a proof is possible in view of the fact that bisection almost always guarantees convergence. Almost is an appropriate term here as will be demonstrated when we let the initial parameter r2 = 1. For example, we can toggle print(dx) to check the convergence. For primex(1e116) we get, 9.999999999999999999999999970 E115

EXAMPLE

The (10^3)-th prime is 7919. So 7 is the 4th term.

PROGRAM

(PARI) g(n) = print1(2", "); for(x=1, n, y=Vec(Str(primex(10^x))); print1(y[1]", ")) primex(n) = \Efficient Algorithm to accurately approximate the n-th prime { local(x, px, r1, r2, r, p10, b, e); b=10; \Select base p10=log(n)/log(10); \p10=pow of 10 n is to adjust in b^p10 if(Rg(b^p10*log(b^(p10+1)))< b^p10, m=p10+1, m=p10); r1 = 0; r2 = 2.718281828; \Real kicker. if 1, it bonks at 1e117 for(x=1, 360, r=(r1+r2)/2; px = Rg(b^p10*log(b^(m+r))); if(px <= b^p10, r1=r, r2=r); r=(r1+r2)/2.; ); (b^p10*log(b^(m+r))+.5); } Rg(x) = \ Gram's Riemann's Approx of Pi(x) { local(n=1, L, s=1, r); L=r=log(x); while(s<10^100*r, s=s+r/zeta(n+1)/n; n=n+1; r=r*L/n); (s) }

CROSSREFS

Sequence in context: A028410 A140870 A080880 this_sequence A021447 A136536 A023507

Adjacent sequences: A120840 A120841 A120842 this_sequence A120844 A120845 A120846

KEYWORD

base,nonn

AUTHOR

Cino Hilliard (hillcino368(AT)gmail.com), Aug 18 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 14:49 EST 2009. Contains 167514 sequences.


AT&T Labs Research