1610.31 – Nasty Numbers


Let us say that a positive integer is nasty if it has two different factorizations such that the difference between the two factors of one of the factorizations equals the sum of the two factors of the other factorization. For example, 6 is nasty because 2+3=612 + 3 = 6 - 1 and 24 is nasty because 4+6=1224 + 6 = 12 - 2. And 30 is nasty because 3+10=152.3 + 10 = 15 - 2.

Find all nasty numbers less than 180. There are six besides the examples. (This is a nifty problem to do on a computer.)


Solution

The other six are 54, 60, 84, 96, 120 and 150.