Brute force implementation for Problem #7
Solution for Problem #7 (using the sieve of Eratosthenes)