What kind of pattern it is...? I have observed the following pattern:
Take the number $21$, and write cubes of each digit and add it; then we have;
$21$$......> 2^3 + 1^3 = 9$
Now the result $9^3$ = $729$
From the result; $729$$......> 7^3 + 2^3 + 9^3 = 1080$
From $1080$$......> 1^3 + 0^3 + 8^3 + 0^3 = 153$ 
From $153$$......> 1^3 +5^3+3^3 = 153$
Now we cannot write further, in case even if we write there is no use, as we end up with the same number.
Now my question is, If we start up with any number like $21$, we will end at any stage like $153$. Why does this method works?
Also, I observed that, this procedure is failed for number $13$ and $25$. Why the above cited method failed in case of $13$ and $25?$
Let us write $13$ = $1^3 + 3^3$= $28$
Now $28$ = $2^3 + 8^3$= $520$
Now $520$ = $5^3 + 2^3$= $133$$...(1)$
Now $133$ = $1^3 + 3^3+ 3^3$= $55$
Now $55$ = $5^3 + 5^3$= $250$
Now $250$ = $2^3 + 5^3$= $133$$...(2)$
From $(1) and (2),$ we can understand that, the same steps are repeating. However, our initial example is quite different. Why the story is not applicable for some numbers like $13$ and $25?$ . Also is there any use of this kind of procedures...
Thank you so much for reading this much big paragraphs.
 A: The reason for the occurence of such cycles is the following: 
You are considering the orbit of the map $$\begin{eqnarray}f: \Bbb N& \rightarrow &\Bbb N \\ a_1\dots a_d &\mapsto &a_1^3+\dots + a_d^3.\end{eqnarray}$$
As the highest value for a $d$-digit number is obtained for $10^d-1$ and as $f(9999) = 4 \cdot 9^3  \leq 9999$, 

$f(n) \leq n$ is decreasing for $n\geq 10^4$, and also $f(n)<10^4$ for $n\leq 10^4$.

Thus, starting with any number, we will eventually arrive at a number $<10^4$ and the sequence never exceeds that bound again. So every orbit under $f$ must be eventually periodic.
By checking all numbers below $10^4$ we can verify that the only possible cycles are: 
$$\begin{eqnarray}1&\to& 1\\55 &\to& 250 \to 133 \to 55 \\136& \to& 244 \to 136 \\ 153 &\to& 153 \\ 160& \to& 217 \to 352 \to 160 \\ 370 &\to &370 \\ 371 &\to &371 \\ 407& \to &407 \\919& \to& 1459 \to 919\end{eqnarray}$$
A: As the wikipedia article points out, note that when $n>2916$, we have that $f(n)<n$.
We are now ready to prove the following claim:

For any $n \in \mathbb{N}$ there is a $k \in \mathbb{N}$, such that $f^k(n)=153$ if $n$ is divisible by 3.

To see this you can apply induction and check that the statement holds for all $n \leq 2916$.
For the induction step note that if $n$ is divisible by $3$, then $f(n)$ is also divisible by $3$.
For further reference see this and this.
