The digital root of a nonnegative integer in a given base is the digit
obtained by repeatedly taking its digit sum until a
single digit remains. The number of digit
sum steps is the additive persistence
of
. The digital root of 0 is 0.
For example, the sequence obtained from the starting number 9876 in base 10 is (9876, 30, 3), so 9876 has an additive persistence
of 2 and a digital root of 3. The base-10 digital roots of the first few positive
integers are 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, ... (OEIS A010888). The digital root of a positive integer
can be computed without actually performing
the iteration using the simple congruence formula
|
(1)
| |||
|
(2)
|