Attempt to do Project Euler in Java