playing with primes logic (use division instead of modulus)