Explanation of Digital Root/ Sum formula The formula to find the digital root/ sum is:
digital root of n = 1 + ( (n - 1) % 9 )

Can someone explain me the intuition behind this formula? Why does this result give the sum of digits?
 A: Numbers in base $10$ are "arranged" into boxes of $10$ entries. For example, $21$ looks like
$$
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\cdot\\
\blacksquare  \square \square \square \square \square \square \square \square \square
$$
and $123$ looks like:
$$
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\cdot\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\blacksquare \blacksquare \blacksquare \blacksquare \blacksquare  \blacksquare \blacksquare \blacksquare \blacksquare \blacksquare\\
\cdot\\
\blacksquare  \blacksquare \blacksquare \square \square \square \square \square \square \square
$$
When you take the modulo $9$, you remove all the "full" packages such as the $100$ and only $1$ remains. (Remove the first $9$ columns, and $10$ boxes remain. $10  \equiv 1\mod 9$). This builds up, so $200$ loses for each $100$ box $99$ boxes, and $2$ boxes remain.
Hope this helps to visualize the operation.
A: From here:

The digital root is the value modulo 9 because $10\equiv 1{\pmod  {9}}$, and thus $10^{k}\equiv 1^{k}\equiv 1{\pmod  {9}}$, so regardless of position, the value mod $9$ is the same – $ a\cdot 100\equiv a\cdot 10\equiv a{\pmod  {9}}$ – which is why digits can be meaningfully added. Hope it helps. 
