Project Euler, Problem 12 Java, ineffizient solution probably running to the last day