
Let's consider how to find a list of candidates that forms n1*n2=n, let's call [n1,n2] a 2tuple, we loop from 2 to sqrt(n) and find all n1 that is a factor of n, then n2=n/n1. n1<n2 always.

how to build our solution that from above subproblem? Essentially you ask all the Ntuples that can multiply to n. and Ntuple is made up by N1tuple plus one number. Above described process is clearly a recursion, and the termination condition is you've tried all combinations.

But what forms the combination? suppose a number n%i==0, a full set would be
 2tuple, [i, n/i]
 Ntuple (N>2) eg. [i, all Ntuples of (n/i)]
So below is the bottom up approach
public List<List<Integer>> getFactors(int n) {
return getFactors(n, 2);
}
private List<List<Integer>> getFactors(int n, int min) {
List<List<Integer>> list = new LinkedList<>();
int end = (int) Math.sqrt(n);
for (int i = min; i <= end; i++) {
if (n % i != 0) continue;
list.add(new LinkedList<>(Arrays.asList(i, n / i)));//add 2tuple
List<List<Integer>> prev = getFactors(n / i, i);
for (List<Integer> inner : prev) ((LinkedList<Integer>) inner).addFirst(i);
list.addAll(prev);//add Ntuple(N>2)
}
return list;
}
And top down using stack.
public List<List<Integer>> getFactors(int n) {
List<List<Integer>> res = new ArrayList<>();
combination(n, 2, new Stack<>(), res);
return res;
}
public void combination(int n, int start, Stack<Integer> stack, List<List<Integer>> res) {
int end = (int) Math.sqrt(n);
for (int i = start; i <= end; i++) {
if (n % i != 0) continue;
res.add(new ArrayList<>(stack));
res.get(res.size()  1).add(i);
res.get(res.size()  1).add(n / i);
stack.push(i);
combination(n / i, i, stack, res);
stack.pop();
}
}