Saturday, December 09, 2006

How To Calculate Primes

A Prime is defined as any number that can only be divided only by itself and 1. If you suspect that a number is a Prime, the only way to absolutely know if it is a Prime number is to divide it by all the preceding numbers to see if that particular number is a Prime or in other words divisible only by itself and 1. Fine for low numbers but a royal pain for large numbers. To add to the fun, if you look at a table of Primes it seems to follow a pattern, but nobody has been able to find the formula for that pattern. If you examine a table of Primes you will find that none of the Primes are an even number. Therefore if you write down all the numbers from 1 to infinity and divide the numbers by 2, and eliminate those divisible evenly by 2 it’s a start. If you look at a table of Prime Numbers you will see after the first column of Prime Numbers (1, 2, 3, 5, 7 ) the Prime Numbers with more than 1 column ( 11, 13, 17, 19 ) end in 1, 3, 7, and 9. The downside of numbers ending in 1, 3, 7 and 9 is that not all these numbers are Prime. Oh well, it’s a start for eliminating a lot of odd numbers ending in 5 that aren’t Prime. If however, you divide all the Prime numbers from 1 to infinity ending in 1, 3, 7, 9 by 9 you will find that the decimal part of the answer after dividing by 9 is .111111, .22222, .444444, .555555, .77777, .888888. You will notice that there is no .3333333 or .6666666. It seems that an odd number ending in 1, 3, 7, 9 when divided by 9 and has a decimal part of the answer being .333333 or .66666 is not a Prime number.

In summary:

Prime numbers end in 1, 3, 7, 9 after the first column.

Not all numbers ending in 1, 3, 7, 9 are Prime numbers.

Divide all the numbers ending in 1, 3, 7, 9 by 9.

If the answer contains .33333 or .666666 or .6666667 it isn’t a Prime number.

If the answer contains .111111, .222222, .44444, .55555, .777777, or .88888 it is a Prime number.