Not the most efficient or elegant code but...(and my high school CS teacher would disapprove of me saying this) it works!

Doing comparisons using strings saves a bunch of time. Checking for even early divides and conquers the problem. Still have to iterate by 2 if it's a really large prime number though! But we're looking for factors and the largest factor can't be larger than the square root of the number. I wasn't sure if square root of a large number would take a while. Also, I didn't see a function for square root for BigInteger.

Need to convert to BigInteger to take in large number (600 billion is the goal).