Knowledge Node - Prime Numbers

return to Knowledge Node index

I really hate to leave my laptop idle when it has such a powerful processor just waiting to be used.  I wrote a computer program that found all the prime numbers from one to a one billion.  I wrote another computer program to interpret the output, splitting each count into increments of one million each.  In this fashion I am able to determine a rough estimate as to how many prime numbers exist.  While it has already been mathematically proven that there is an infinite number of prime numbers and that no largest prime number can be found, this data gives a good idea at infinity, just how many prime numbers there are.

Below is a sample of the data I accumulated while working on my prime number project.  The horizontal axis is in units of millions.  For example, the data point 200 on the x axis means from the range of 199,000,000 to 199,999,999, there were 52,363 prime numbers.  Here is the data I gathered.  I would post every prime number from one to one billion on my website, but that data is approximately 200 megabytes!  But, for the record, there are 50,847,534 prime numbers between one and one billion, give or take a few!

Prime Numbers in Terms of Factors of Primes Plus One

Since all non-prime numbers can be described as multiples of primes, another idea I had was to generate prime numbers by using other primes.

2^1 = 2
2^2+1 = 5
2^4+1 = 17
2^8+1 = 257
2^16+1 = 65537
2^32+1 = 4294967297

2+1 = 3
2*3+1 = 7
2*3*3+1 = 19
2*3*3*3*3+1 = 163
2*3*3*3*3*3+1 = 487
2*3*3*3*3*3*3+1 = 1459
2*3*3*3*3*3*3*3+1 = 4357
2*3*3*3*3*3*3*3*3*3+1 = 39367

2*5+1 = 11
2*2*3+1 = 13
2*11+1 = 23
2*2*7+1 = 29
2*3*5+1 = 31

just curious... added 5/4/04

Some interesting references:

return to Knowledge Node index


return to the main page