3. The answer is $n=2^{k}+k-1$.

Let $n=2^{k}+k-1$. We will only consider the boxes $b_{n-k}, b_{n-k+1}, \ldots, b_{n}$, initially setting them to have $1,2,2^{2}, \ldots, 2^{k}$ coins respectively. In each step, we choose the box with only one coin and add $2^{k}-1$ coins to it $\left(2^{k}-1 \leqslant n-k\right.$; any excess is ignored), and remove half the coins from each of the remaining $k$ boxes. Thus, after each move, these $k+1$ boxes will have $1,2,2^{2}, \ldots, 2^{k}$ coins in some order, and the game will never end.

Now let $n1$ (the case $k=1$ is trivial). Consider the sum

$$
S=\sum_{i=1}^{n}\left\lfloor\log _{2} n_{i}\right\rfloor, \quad \text { where } n_{i} \text { is the number of coins in box } b_{i} \text {. }
$$

In each move, $k$ terms in this sum decrease by 1, and the term $\left\lfloor\log _{2} n_{j}\right\rfloor$ increases when we add $j$ coins to box $b_{j}$. However, for $n_{j} \leqslant 2^{k}-k+1$, we have $\left\lfloor\log _{2}\left(n_{j}+j\right)\right\rfloor \leqslant k$, and otherwise $\left\lfloor\log _{2}\left(n_{j}+j\right)\right\rfloor=k+1<\left\lfloor\log _{2} n_{j}\right\rfloor+k$. Therefore, the increase in the term $\left\lfloor\log _{2} n_{j}\right\rfloor$ is not greater than $k$, and equals $k$ only if $n_{j}=1$ and $j \geqslant 2^{k}-1$. It follows that the sum $S$ cannot increase, and to avoid an infinite decrease, from some point onward, we must only add to boxes $b_{j}$ with index $j \geqslant 2^{k}-1$. There are at most $k$ such boxes. Therefore, in each move, we will take coins from at least one of the first $2^{k}-2$ boxes, never adding to them, and we will inevitably empty one of them, thus ending the game.
3. Let $k$ be a natural number. Determine the smallest natural number $n \geqslant k+1$ for which the following game can be played for infinitely many moves:

Consider $n$ boxes labeled $b_{1}, b_{2}, \ldots, b_{n}$, where each box $b_{i}$ initially contains exactly $i$ coins. In each move, the following three steps are performed in sequence:

- Choose $k+1$ boxes;
- From these $k+1$ boxes, select one, say $b_{i}$. Add $i$ coins to this box, and remove at least half of the coins from each of the remaining $k$ boxes.
- If any box becomes empty, the game ends. Otherwise, proceed to the next move.

(Kiyap)