Problem 214 and the PrimesAndFactors utility class