Pairing unit fractions
In first for loop we can stop when i*i&gt;=n. As we need two different divisors, smallest must be less than Math.sqrt(n)
Second for loop looks like simple integer division.


Whole code is equivalent to this:

    private static int[] provideFactorsSmallest_v(int n) {
        for (int firstTerm = 2; firstTerm*firstTerm &lt; n; firstTerm++) {
            if (n % firstTerm == 0) {
                int secondTerm = n / firstTerm;
                return new int[]{
                        (firstTerm + secondTerm) * firstTerm,
                        (firstTerm + secondTerm) * secondTerm
                };
            }
        }
        return null;
    }