A friend of mine give me this problem for fun:
Given $\frac {n(n+1)}{2}$ balls, first we divide arbitrarily these balls in baskets, after that we make another basket with one ball of each basket e do this procedure infinitely.
I want to prove that one time this stabilizes with 1 ball in one basket, 2 balls in another basket, ..., n balls in another basket.
It seems easy to solve, he says we can use some concept of energy (???), I'm trying with some concepts of combinatorics without any success.
Thanks in advance.
I believe what you are discussing is known as Bulgarian solitaire. This is a theorem of Jorgen Brandt, i.e., that the game ends as you have described when the number of balls (or cards) is a triangular number, i.e., of the form $n(n+1)/2$.
Here is a nice source to read over: (paywall)
Solution of the Bulgarian Solitaire Conjecture
Kiyoshi Igusa
Mathematics Magazine
Vol. 58, No. 5 (Nov., 1985), pp. 259-271
Published by: Mathematical Association of America
Article Stable URL: http://www.jstor.org/stable/2690174
Note this is also the subject of a problem in the June/July 2013 AMM: Problem 11712.