Project Euler project 3 in Java (find highest prime factor)