around 200 BCE
The Sieve of Eratosthenes
Finding the primes by crossing out everything that isn’t
The sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to any given limit by crossing out multiples of numbers.
The earliest known reference to the sieve of Eratosthenes for finding prime numbers is in Introduction to Arithmetic by Nicomachus of Gerasa (60–120 CE), which describes it and attributes it to Eratosthenes of Cyrene (around 276–194 BCE), a Greek mathematician. Nicomachus was translated into Arabic by Thābit ibn Qurra (d. 901).