You only have to test the numbers 1 through 5. If you know the rules of divisibility, you know that 3, 4 and 5 aren't factors.
1x40, 2x20, 4x10, 5x8 are all the factor pairs of 40.
The factor pairs of 20 are: 20,1 / 10,2 / 5,4
Apart from [1,201], [3,67] is the only other factor pair. Since both 3 and 67 are prime numbers, you know you won't be able to find any more factor pairs.
The factor pairs for 38 are (1, 19) and (2, 38).
The factor pairs of 26 are: 1 × 26 2 × 13
53,1
1,3,149,447
612,1306,2204,3153,4102,668,951,1236,1734,18
57,119,3
They are:165,155,333,515,11
1,81,3,27,9
51,117,3