getAllPrimesPlain

Gets all primes until the limit by checking whether every number in the loop is a prime number.