Sequences with integral means Let $S(n)$ be the sequence whose first element is $n$, and from then onward,
the next element is the smallest natural number ${\ge}1$ that ensures that the
mean of all the numbers in the sequence is an integer.
For example, the second element of $S(4)$ cannot be $1$ (mean $\frac{5}{2}$),
but $2$ works: $S(4)=4,2,\ldots$. Then the third element cannot be 
$1$ (mean $\frac{7}{3}$)
or $2$ (mean $\frac{8}{3}$), but $3$ works: $S(4)=4,2,3,\ldots$.
And from then on, the elements are all $3$'s, which I'll write as 
$S(4)=4,2,\overline{3}$.
Here are a few more examples:
$$S(1)=1,\overline{1}$$
$$S(2)=2,2,\overline{2}$$
$$S(3)=3,1,\overline{2}$$
$$S(4)=4,2,\overline{3}$$
$$S(5)=5,1,\overline{3}$$
$$S(11)=11,1,3,1,\overline{4}$$
$$S(32)=32,2,2,4,5,3,1,\overline{7}$$
$$S(111)=111,1,2,2,4,6,7,3,8,6,4,2,\overline{13}$$
$$S(112)=112,2,3,3,5,1,7,3,8,6,4,2,\overline{13}$$
$$S(200)=200,2,2,4,2,6,1,7,1,5,1,9,7,5,3,1,\overline{16}$$
Has anyone studied these sequences?
Is there a simple proof that each sequence ends with a repeated number
$\overline{m}$?
Is there a way to predict the value of $m$ from the start $n$ without computing the
entire sequence up to $\overline{m}$?
Might it be that the repeat value $m=r(n)$ satisfies $r(n+1) \ge r(n)$?
This question occurred to me when thinking about streaming computation of means,
a not-infrequent calculation (e.g., computing mean temperatures).

Added, supporting the discoveries of several commenters: $r(n)$ red,
and now fit with $1.135 \sqrt{n}$ blue for $n\le 10000$:
 

As per Eckhard's request, with Will's function $\sqrt{4n/3} -1/2$:
 

Let $k$ be sufficiently large .Denote the sequence   $n,a_1,...a_{k-1}$ with $a_i\leq i+1$ where $i\leq k-1$.
The sum of the first  $k$ elements including $n$  (denote it by $S_+(a_k)$) must be always  a multiple of $k$ .
So let $d$ be a positive integer with $S_+(a_k)=d\cdot k=n+a_1+...+a_{k-1}\leq n+2+...+k=n-1+k\frac{k+1}{2}$ .
 So  $d=\frac{S_+(a_k)}{k}=\frac{n-1}{k}+\frac{k
+1}{2}<k$ for $k$ large enough. 
We will see that the period we want is the number $d$.  
We will show that the next element $a_k$  is the number $d$ and inductively we wil reach our goal.
Let $a_k$ be the next element ,so we must have $k+1|S_+(a_{k+1})$ meaning that $k+1|d\cdot k+a_k$
which gives $k+1|a_k-d$.
But $a_k\leq {k+1}$ and $d<k$ so we have only the case $a_k-d=0$ and so, $a_k=d$
(Repeat the argument again)
So we only wait until $\frac{n-1}{k}+\frac{k+1}{2}<k$ to find the period $d$.
This gives the bound closely to $\sqrt n$ which Lucia commented.
I hope this helps.
