Title: Question
1Question Prime Numbers The formula p1 x p2 x
p3.pn 1 demonstrates how to find another
prime. However, how do we find 5 or 19 as a
prime number? not this way! That is a correct
student observation. The formula was given to
demonstrate that no matter how many primes we
find, we can always find one more so there are
infinitely many of them. This is not a method
of finding all primes the sieve was
presented as a method of finding all primes but
is very compute intensive.
2Prime Number Theorem There is no known
elementary function meaning a
polynomial, exponential, logarithm, or
trigonometric function that, given any prime
number, will generate the next prime number. We
have indicated that there were infinitely many
primes, but did not talk much about how many
primes there were in the range we were
interested in, say 512 1024 bits. How many
primes are there less than 512 bits in length?
This is given by the prime counting function ?
(n) and is ? (n) n/ln n for large values of
n
3How Many Prime Numbers? For 512 bits there are
about 10151 prime numbers. Perspective there
are an estimated 1077 atoms in the universe. If
every atom consumed 1 prime number every
microsecond from the beginning of time we would
use up about 10109 primes and 10151 10109
10151. Will two people use the same prime? in
this range and a good random selector, the odds
are very, very low. Odds are less that the odds
of your computer spontaneously combusting at the
same moment you win the Lottery! Could I make a
database of all primes? If this were possible,
we could easily break public-key algorithms
by doing simple searches.
4How Many Prime Numbers? But, is it
possible? Assume you could store 1 Gbyte on a
disk weighing one gram and somehow do I/O to it.
That is a lot of disks! The disks to contain
just the 512 bit primes would be quite heavy, not
to Mention the power to run them. Recall, that
the number of 512 bit primes exceed the number of
atoms in the universe pretty heavy. Would make
a very powerful black hole. The source for these
interesting tid-bits is Schneier, Bruce,
Applied Cryptography, 2nd ed., Wiley,1996.
5How Do I Do Arithmetic on Prime Numbers? Another
good question. These are not your average 32 or
64 bit single or double (64 128 bit) precision
integer operations. Write your own. Use a
standard (?) library. For example, RSA security
has written a Standard library for 512 bit
integer arithmetic. Go to the web
http//dmoz.org/Science/Math/Number_Theory/Softwar
e/ Search Google on multiple precision integer
arithmetic.