perl -Mbigint -E "use Math::Prime::Util::GMP qw(factor); say 0+(factor(600851475143600851475143600851475143))[ -1]" 999999000001 # ~1 second to get the largest factor of: # 6008514751436008514751436008514751430085147514300851475143008514751430085147514300851475143 834789126661809633627036527926883609177018602883402075695455196267