The Sieve of Eratosthenes is one such. Write out the numbers 1 to 100 in 10 rows. Cross out 1. Start at 2 and cross out multiples of 2. That will eliminate all the rest of the even numbers. Go to the next uncrossed-out number (3) and cross out all of its multiples. Some of them will already be crossed out. Proceed in this fashion. Five will be next. You can stop by the time you get to ten. All of the uncrossed-out numbers are prime.
Chat with our AI personalities
One method for finding prime numbers is called the "Sieve of Eratosthenes" because it basically "sifts" through the numbers looking for numbers that are not not prime.
One
A sieve.
Eratosthenes created a sieve that will do that.
5,7,11,13 are prime I would suggest looking into the sieve of erasthenes for further reading. For tests, look at odd numbers and see if odd numbers divide them. ie 9 is not in the lsit because it is divisible by 3. Even numbers are always divisible by two.