How we calculed primer numbers

We have calculated the prime numbers from the basis that 2, 3,and 5 are prime.

Then we get 6 (and afterwards 7, 8, 9, etc) and we have divided it by the previous prime numbers (only the primes because the others are a composition of those) and if any of the divisions is exact, it is NOT prime., if none is exact, it IS prime.

Also, for speeding it up, we have only divided the ones ending in 1, 3, 5, and 9 because the others (the ones ending in 2, 4, 5, 6, 8, or 0) can be divided by either 2, 5, or both.

That is the basics.

Another issue is that the day I finished the calculations I got to know about some Aristophanes who proved that you only need to check whether they can be divided by the primes up to the square root of the number for knowing if it is prime (for checking 100 we would only need to check 2, 3, 5, and 7, because the square root of 100 is 10). Although I did not include that in my algorithm because I did not know it, it would increase the speed a lot. I recommend that you use it if you try my method.

Program for download(c in zip)    Program to see (txt)    Previous page