Solution of the Week #307 - Descend the Ladder

For a number to directly reach ‘n’, a number ‘m’ must exist that is the highest prime factor of n+m+1. If n+m+1 is divisible by m, which is a necessary (but not sufficient) condition for this, then n+1 must also be divisible by m. So we can find all possible candidates for numbers that can directly lead to 5 by looking at the prime factors of 5+1. These are 2 and 3.

Considering m=2, our n+m+1 is 8, and 2 is indeed the highest prime factor. So 8 leads to 5.

Considering m=3, our n+m+1 is 9, and 3 is indeed the highest prime factor. So 9 leads to 5.

Now let’s consider n=8, the only prime factor of n+1 is 3, so 12 is a possible candidate we need to check. The highest prime factor of 12 is 3, so that works.

Next, n=9 gives us the candidates 12 again, and 15. 15 works as its highest prime factor is 5.

Consider n=12, the only prime factor of n+1 is 13, giving us 26, which works.

For n=15, m=2, the candidate of 18 comes up, however the highest prime factor of 18 is 3, so this doesn’t work and proves a dead end.

Finally, n=26, m=3, we need to check to see if the highest prime factor of 30 is 3. It isn’t, so this is another dead end.

So the full list of composite numbers that reach 5 is: 8, 9, 12, 15 and 26.