Solution of the Week #592 - Mega Sequence

The last time ‘m’ appears in the sequence is at the mth triangular number. The formula for the mth triangular number is m(m+1)/2. If we are looking for the nth number in the sequence, we are effectively working backwards with the same formula.

If we double n and then take the square root and then round to the nearest integer, that will give us the nth number in the sequence. Since the square root of 2 million is sqrt(2)*1000, which is 1414.2.. This will round to 1414. (I feel like most people know the square root of 2 to a few decimal places, but failing that there are ways of finding a square root by hand to a required degree of accuracy however I won’t go into them here).

The millionth term is 1414.