fix prime_factor_multiplicities