Write SumOfPrimeFactors