private ArrayList<Integer> mergeWithFactorialFactors(ArrayList<Integer> list, int n) {
        ArrayList<Integer> ret = list;

        if (factorialFactors.containsKey(n)) {
            ret = mergeSortedLists(ret, factorialFactors.get(n));
        } else {
            for (int i = 2; i <= n; ++i) {
                ret = mergeSortedLists(ret, factor(i));
            }

            factorialFactors.put(n, ret);
        }

        return ret;
    }