Convert from base $10$ to base $5$ I am having a problem converting $727$(base $10$) to base $5$. What is the algorithm to do it?
I am getting the same number when doing so: $7\times 10^2 + 2\times10^1+7\times10^0 = 727$, nothing changes.
Help me figure it out!

The trick is to realize that
\begin{align*}
727 &= 625 + 0*125 + 4*25 + 0*5 + 2 
\\ &= 5^4 + 0 *5^3 + 4*5^2 + 0*5^1 + 2*5^0.
\end{align*}
So the answer is $10402$.
