Need not for speed, but for Prime

An integer is randomly selected in the interval between 1 and 1 0 10 10^{10} inclusive. What is the probability that it is a prime number ?

Give your answer to 2 significant figures.


The answer is 0.0455052511.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

According to Gauss' Prime Counting Function , number of primes less than n, π ( n ) = n l n ( n ) \pi (n)=\frac{n}{ln(n)} And its obvious that there are n numbers in this range.

So, the probability, p = π ( n ) n p=\frac{\pi (n)}{n} = n l n ( n ) n =\frac{\frac{n}{ln(n)}}{n} = 1 l n ( n ) =\frac{1}{ln(n)} For our problem, n = 1 0 10 n=10^{10}

Now its just the calculator's job. Thus, p = 1 l n ( 1 0 10 ) p=\frac{1}{ln(10^{10})} = 0.04343 ( a p p r o x . ) =0.04343 (approx.)

n ln ( n ) \frac{n}{\ln\left(n\right)} is just an approximation and is off the actual value. There are better approximations, which can give you a different value.

Arulx Z - 4 years, 11 months ago

Log in to reply

I did not know that. Could you site some examples?

Agnishom Chattopadhyay - 4 years, 11 months ago

Log in to reply

x / ln x x/\ln { x } gives an approximation because lim x π ( x ) x / ln x = 1 \lim _{ x\rightarrow \infty }{ \frac { \pi \left( x \right) }{ x/\ln { x } } = 1} . However, for any finite value, there's always some percentage of error, which decreases as x x grows. OEIS has a nice table on this. Check this page which discusses a lot of other prime counting functions with much smaller margins of error.

10 10 ln 10 10 434294482 \frac { { 10 }^{ 10 } }{ \ln { { 10 }^{ 10 } } } \approx 434294482

while the actual value is 455,052,511. Which means that this approximation is off by 20758029.

Arulx Z - 4 years, 11 months ago

Log in to reply

@Arulx Z This is why there is so much of fuss over Riemann Hypothesis...

Arulx Z - 4 years, 10 months ago

Log in to reply

@Arulx Z Thanks for enlightening. :-)

Muhammad Arifur Rahman - 4 years, 10 months ago

I've edited the problem starement. Please check if its befitting now.

Muhammad Arifur Rahman - 4 years, 11 months ago

I am changing this to a Number Theory problem. Is that alright?

Agnishom Chattopadhyay - 4 years, 11 months ago

@Agnisom Chattopadhay: Its fine. Thanks.

Muhammad Arifur Rahman - 4 years, 11 months ago

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...