Re: Percentage of Prime Numbers
- From: Mensanator <mensanator@xxxxxxx>
- Date: Sun, 11 May 2008 21:58:17 -0700 (PDT)
On May 11, 8:46 pm, Narcoleptic Insomniac
<i_have_narcoleptic_insom...@xxxxxxxxx> wrote:
On May 11, 2008 2:37 PM CT, orangata...@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).
It would appear to be more than that. The first letter
is the code for the Federal Reserve Bank. The second is
the run number. I think this means a particular prime
can appear 26 times for each of the 12 FRBs. And I got
the impression from various web sites that each ***
of paper contains 32 bills with the same number. They
claim 32*26 or 832 bills with the same number (not
counting the FRB).
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.
I just happened to have a wad of 28 one dollar bills
and found:
04284315 x
20948480 x
18823776 x
25035494 x
20298387 x
41328940 x
09083777 x
77950606 x
74764206 x
19692481 prime
79574678 x
90007632 x
90007631 x
77409753 x
93215626 x
13238183 x
40463897 x
30162626 x
53558093 x
40728940 x
27475180 x
92293006 x
49975428 x
80104290 x
33550351 prime
82784801 x
52471303 x
84361182 x
No big surprise there, but here's a surprise.
The FRB distribution was
Federal Reserve Banks:
2 **
3 **
4 ****
5 *
6 ******
9 *
11 *****
12 *******
which, being from the Chicago area, it is
quite unusal to have 28 bills without a single
instance of the local Chicago FRB (7).
Regards,
Kyle Czarnecki- Hide quoted text -
- Show quoted text -
.
- References:
- Re: Percentage of Prime Numbers
- From: orangatang1
- Re: Percentage of Prime Numbers
- From: Narcoleptic Insomniac
- Re: Percentage of Prime Numbers
- Prev by Date: Re: Writing a real valued expression in a form that does not include sqrt(-1)
- Next by Date: Re: E = m c^2 and Riccati
- Previous by thread: Re: Percentage of Prime Numbers
- Next by thread: Re: Percentage of Prime Numbers
- Index(es):