Re: Percentage of Prime Numbers
- From: Narcoleptic Insomniac <i_have_narcoleptic_insomnia@xxxxxxxxx>
- Date: Sun, 11 May 2008 21:46:30 EDT
On May 11, 2008 2:37 PM CT, orangatang1@xxxxxxxxxxxxxx wrote:
On 11 May, 13:12, Narcoleptic Insomniac
<i_have_narcoleptic_insom...@xxxxxxxxx> wrote:
On May 11, 2008 6:36 AM CT, ad...@xxxxxxxxxxxx
wrote:
Hi,
I just checked my 10-€-Banknote and found out the
serial number is a prime number. I just asked the
European Central Bank how many Banknotes circulate
and want now to find out the chance that a randomly
picked banknote has a prime serial number. So - is
there any possibility (without crashing my PC) to
find out how many prime numbers are in a given area
of numbers?
Thanks a lot!
Yes, one way would be to use approximations of the
prime counting function (denoted pi(x)). The Prime
Number Theorem tells us that this function is
asymptotic to x / ln(x), or in other words
pi(x) ~ x / ln(x).
So, suppose that you wanted to know roughly how many
primes were between A and B (given B > A). Then,
by the PNT, we know that
pi(B) - pi(A) ~ B / ln(B) - A / ln(A)
= B ln(A) - A ln(B) / [ln(B) ln(A)]
= ln(A^B) - ln(B^A) / [ln(B) ln(A)]
= ln(A^B / B^A) / [ln(B) ln(A)]
..is roughly the number of primes between A and B.
Of course, you can divide this by (B - A) to get an
approximate density.
Regards,
Kyle Czarnecki
that is cool. any idea why?
Yes, I've always found number theory to be one of the most
beautiful branches of pure mathematics. As for "any idea
why," I'm not sure exactly what you're asking.
Out of curiosity, I've calculated a similar example of
the above method using U.S. currency. The serial numbers
on the U.S. one dollar bill (2006 series) have the form
A 12345678 B
...that is, eight digits between two letters. I am unsure
of how these digits are assigned, but let us first assume
that they range from 00000000 to 99999999. It follows
that there are 10^9 possible serial numbers (neglecting
alphabetic characters).
Moreover, the PNT states that
pi(10^9) ~ 10^9 / ln(10^9) ~= 48254942
...which implies that there are approximately 48254942
primes between 0 and 10^9. Thus, the density of primes
in this interval is
pi(10^9) / 10^9 ~ 1 / ln(10^9) ~= 0.048254942
...and hence about 4.8255% of U.S. one dollar bills (in
this case) will have a prime serial number.
It should be mentioned that there exist better
approximations to the prime counting function; namely,
pi(x) ~ li(x)
...where li(x) is the logarithmic integral of x. (I think
that someone this thread already pointed out this fact.)
If we use this approximation, then
pi(10^9) ~ li(10^9) ~= 50849234.957
...which implies...
pi(10^9) / 10^9 ~= 0.050849234957
...and so, using this approximation, we see that (in this
case) about 5.0849% of U.S. one dollar bills have a prime
serial number.
Actually, Mathematica says that pi(10^9) = 50847534, and
so the density is
pi(10^9) / 10^9 = 0.050847534
...which implies about 5.0848% of U.S. one dollar bills
(in this case) will have a prime serial number.
Note how much closer the li(x) approximation is. I don't
know about you, but I find it a bit suprising that
approximately 1 in 20 $1 bills has a prime serial! *_*
Again, purely out of curiosity, let us take a look at a
similar problem. Suppose that we have a U.S. dollar bill
whose serial begins with the digit 9.
What are the chances that such a dollar bill contains a
prime serial number? Well, this amounts to counting the
primes between 90000000 and 99999999.
Using the pi(x) ~ x / ln(x) approximation yeilds
pi(99999999) - pi(90000000) ~ 99999999 / ln(99999999) -
90000000 / ln(90000000) ~= 514761.975776
...and since there are 10^7 integers in this interval, the
density is...
[pi(99999999) - pi(90000000)] / 10^7 ~= 0.0514761975776.
Hence, approximately 5.1476% of such U.S. one dollar
bills will have a prime serial number.
Using the pi(x) ~ li(x) approximation instead yeilds
pi(99999999) - pi(90000000) ~ li(99999999) - li(90000000)
~= 544399.097718
...and so the density is about...
[pi(99999999) - pi(90000000)] / 10^7 ~= 0.0544399097718
...whicih implies approximately 5.4440% of such U.S. one
dollar bills will have a prime serial number.
However, Mathematica says that
pi(99999999) - pi(90000000) = 544501
...so the density is...
[pi(99999999) - pi(90000000)] / 10^7 ~= 0.0544501
...and hence about 5.4450% of such U.S. one dollar bills
has a prime serial.
It is interesting to note that, even though we've chosen
the first digit to be 9, we still see that about 1 in 20
U.S. dollar bills will have a prime serial.
Regards,
Kyle Czarnecki
.
- Follow-Ups:
- Re: Percentage of Prime Numbers
- From: Mensanator
- Re: Percentage of Prime Numbers
- References:
- Re: Percentage of Prime Numbers
- From: orangatang1
- Re: Percentage of Prime Numbers
- Prev by Date: Re: on-line calculator
- Next by Date: Generalised Poincaré lemma?
- Previous by thread: Re: Percentage of Prime Numbers
- Next by thread: Re: Percentage of Prime Numbers
- Index(es):
Relevant Pages
|