Primes factor with repetitions

E.g.: prime_factors(18) = [2, 3, 3]