### Implement single-number primality checking and the Sieve of Eratosthenes for finding all primes up to a limit.
Implement single-number primality checking and the Sieve of Eratosthenes for finding all primes up to a limit.