Sequence pattern question

67 Views Asked by At

I have the following question. Let $S_1$ be the sequence of positive integers $1,2,3,4,5 , \ldots$ and define sequence $S_{n+1}$ in terms of $S_n$ by adding $1$ to the integers of $S_n$ which are divisible by $n$. I need to find integers $n$ such that the first $n-1$ integers in $S_n$ are $n$.

So I wrote out some sequences

$S_2 : 2,3,4,5,6,7,8,9,10,11,12$

$S_3: 3,3,5,5,7,7,9,9,11,11,13,13$

$S_4: 4,4,5,5,7,7,10,10,11,11$

$S_5: 5,5,5,5,7,7,10,10,11,11$

$S_6: 6,6,6,6,7,7,11,11,11,11$

$S_7: 7,7,7,7,7,7,11,11,11,11$

and $S_2, S_3, S_5, S_7$ satisfies this property so I guess that the property is $n$ is prime but can anyone explain why?

1

There are 1 best solutions below

0
On

Hint: $S_k$ is weakly increasing-it does not decrease because no number can pass another. A prime $p$ is not increased until $S_p \to S_{p+1}$