title: Generating all factors of a number given its prime factorization
body: <p>If you already have the prime factorization of a number, what is the easiest way to get the set of all factors of that number?  I know I could just loop from 2 to sqrt(n) and find all divisible numbers, but that seems inefficient since we already have the prime factorization.</p>
  
  <p>I imagine it's basically a modified version of a combinations/choose function, but all I can seem to find is methods for counting the number of combinations, and ways of counting the number of factors, not to actually generate the combinations / factors.</p>