About this: it will first check if a number is "probably prime" using gmp_prob_prime(). It will then spend up to 1s testing sums of powers, printing any as appropriate.
GCF (greatest common factors) are calculated using my own, probably somewhat / not terribly inefficient algorithm.