Hacker News new | ask | show | jobs
by nine_k 3543 days ago
Frankly, coming up with an inefficient but simple algorithm for finding primes from first principles should work. That is, accumulate primes found so far, check if the next number is divisible by any of them, or even by any number lower than the latest scanned, if you're really bad at number theory, but fine with logic.

Many Project Euler problems are about such special things that you likely didn't know before encountering the problem, but the definition suffices.