My Project Euler attempts in java