Given a number n and a list of divisors A, how can I efficiently find all the combinations of divisors that, when multiplied, yield to the number? e.g. Output: This is what I managed to do so far (code that I re-adapted from one of the many find-prime-factorization questions on stackoverflow): This code seems to work properly but it’s very