An ancient librarian's trick for finding every prime number at once
Rather than testing each number individually for divisibility, how could you find every prime number up to, say, 100 in one systematic sweep, without doing any division at all?
Reveal the answer
Eratosthenes of Cyrene, chief librarian at Alexandria around 240 BCE, described listing every number and repeatedly crossing out multiples of each remaining prime, starting from 2: cross out every 2nd number, then every 3rd, then every 5th, and so on. Whatever survives the sieve is prime. The 'Sieve of Eratosthenes' is still taught as the simplest algorithm for generating primes.
— Eratosthenes of Cyrene, Sieve of Eratosthenes — c. 240 BCE, described by Nicomachus