how would you calculate a number's largest prime factor
the only way i know is to test every prime number, all the way up to the original number's square root. you either won't find anything, or, along the way you might find a match which is paired with something higher than the square root