I want to iteratively calculate the sum of a number's digits, until the result contains only one digit. For example, when $n=67946$ we get:
$$6+7+9+4+6=32\space\to\space3+2=5\tag1$$
So, when $n=67946$ I must get $5$.
When $n=649134976$
$$6+4+9+1+3+4+9+7+6=49\space\to\space4+9=13\space\to\space1+3=4\tag2$$
So, when $n=649134976$ I must get $4$.
I wrote:
Total[IntegerDigits[n]]
But this only gives the first iteration of the sum of digits.
Mod[n,9,1]
does the trick. $\endgroup$