From: charlescalculus_robertobaggio on
Hi, this is a problem from the magazine mathematical spectrum. It is as follows:

Call S_1 the sequence of +ve integers 1,2,3...
S_(n+1) is obtained by adding 1 to those terms in S_n that are divisible by n. Viz,

S_2 = 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
S_3 = 3,3,5,5,7,7,9,9,11,11,13,13,15,15,17,17,19,19
S_4 = 4,4,5,5,7,7,10,10...

Determine those integers n with the property that the first n-1 integers in S_n are n. Clearly n=3 works, as the first 3-1 = 2 terms of S_3 equals n. (*)

n = 5 works as well, so thus n = 7. n =9 does not work (You have to work out the sequences), while n = 11 works which leads us to suspect that the condition (*) holds only when n is prime.

I can convince myself of this using S_7 as an example:

S_7 = (6 7's in the sequence), (4 ll's next),13,13, 17,17,17,17,19,19...

By the time we get to S_11, the 6 7's in the sequence will now be the first 6 11's in S_11. In the mean time, the 4 ll's in S_7 would not have changed in S_8, S_9 and S_10 because 11 is prime, hence we would have 6 + 4 = 10 = 11 - 1 terms in S_11 which are equal to n. A similar argument shows how S_13 fits condition (*).

However, the only problem I have is showing a formal proof of this. Does anyone have any ideas?