Project Euler, Problem 12 Java, brute force still to slow. back to maths...