Digital root

The digital root (also repeated digital sum) of a non-negative integer is the (single digit) value obtained by an iterative process of summing digits, on each iteration using the result from the previous iteration to compute a digit sum. The process continues until a single-digit number is reached.

For example, the digital root of 65,536 is 7, because 6 + 5 + 5 + 3 + 6 = 25 and 2 + 5 = 7.

Digital roots can be calculated with congruences in modular arithmetic rather than by adding up all the digits, a procedure that can save time in the case of very large numbers.

Digital roots can be used as a sort of checksum. For example, since the digital root of a sum is always equal to the digital root of the sum of the summands' digital roots. A person adding long columns of large numbers will often find it reassuring to apply casting out nines to his result—knowing that this technique will catch the majority of errors.

Digital roots are used in Western numerology, but certain numbers deemed to have occult significance (such as 11 and 22) are not always completely reduced to a single digit.

The number of times the digits must be summed to reach the digital sum is called a number's additive persistence; in the above example, the additive persistence of 65,536 is 2.

Significance and formula of the digital root

It helps to see the digital root of a positive integer as the position it holds with respect to the largest multiple of 9 less than it. For example, the digital root of 11 is 2, which means that 11 is the second number after 9. Likewise, the digital root of 2035 is 1, which means that 2035  1 is a multiple of 9. If a number produces a digital root of exactly 9, then the number is a multiple of 9.

With this in mind the digital root of a positive integer n may be defined by using floor function \lfloor x\rfloor , as

dr(n)=n-9\left\lfloor\frac{n-1}{9}\right\rfloor.

Abstract multiplication of digital roots

The table below shows the digital roots produced by the familiar multiplication table in the decimal system.

dr 1 2 3 4 5 6 7 8 9
1 123456789
2 246813579
3 369369369
4 483726159
5 516273849
6 639639639
7 753186429
8 876543219
9 999999999

The table shows a number of interesting patterns and symmetries and is known as the Vedic square.

Formal definition

Let S(n) denote the sum of the digits of n and let the composition of S(n) as follows:

S^{1}(n)=S(n),\ \ S^{m}(n)=S(S^{m-1}(n)),\ \text{for}\ m\ge2.

Eventually the sequence S^{1}(n),S^{2}(n),S^{3}(n),\dotsb becomes a one digit number. Let S^{\sigma}(n) (the digital sum of n) represent this one digit number.

Example

Let us find the digital sum of 1853.

S(1853)=17\,
S(17)=8\,

Thus,

S^{2}(1853)=8.\,

For simplicity let us agree simply that

S^{\sigma}(1853)=dr(1853)=8.\,

Proof that a constant value exists

How do we know that the sequence S^{1}(n),S^{2}(n),S^{3}(n),\dotsb eventually becomes a one digit number? Here's a proof:

Let n=d_1+10d_2+\dotsb+10^{m-1}d_m, for all i, d_i is an integer greater than or equal to 0 and less than 10. Then, S(n)=d_1+d_2+\dotsb+d_m. This means that S(n)<n, unless d_2,d_3,\dotsb,d_m=0, in which case n is a one digit number. Thus, repeatedly using the S(n) function would cause n to decrease by at least 1, until it becomes a one digit number, at which point it will stay constant, as S(d_1)=d_1.

Congruence formula

The formula is:

 \operatorname{dr}(n) = \begin{cases}0 & \mbox{if}\ n = 0, \\ 9 & \mbox{if}\ n \neq 0,\ n\ \equiv 0\pmod{9},\\ n\ {\rm mod}\ 9 & \mbox{if}\ n \not\equiv 0\pmod{9}.\end{cases}

or,

 \mbox{dr}(n) = 1\ +\ ((n-1)\ {\rm mod}\ 9).\

To generalize the concept of digital roots to other bases b, one can simply change the 9 in the formula to b - 1.

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. Concretely, for a three-digit number,

\mbox{dr}(abc) \equiv a\cdot 10^2 + b\cdot 10 + c \cdot 1 \equiv a\cdot 1 + b\cdot 1 + c \cdot 1 \equiv a + b + c \pmod{9}

To obtain the modular value with respect to other numbers n, one can take weighted sums, where the weight on the kth digit corresponds to the value of 10^k modulo n, or analogously for b^k for different bases. This is simplest for 2, 5, and 10, where higher digits vanish (since 2 and 5 divide 10), which corresponds to the familiar fact that the divisibility of a decimal number with respect to 2, 5, and 10 can be checked by the last digit (even numbers end in 0, 2, 4, 6, or 8).

Also of note is the modulus 11: since 10 \equiv -1\pmod{11}, and thus 10^2 \equiv (-1)^2 \equiv 1\pmod{11}, taking the alternating sum of digits yields the value modulo 11.

Some properties of digital roots

The digital root of a number is zero if and only if the number is itself zero.

\mathit{dr}(n)=0 \Leftrightarrow n=0.

The digital root of a number is a positive integer if and only if the number is itself a positive integer.

\mathit{dr}(n)>0 \Leftrightarrow n>0.

The digital root of n is n itself if and only if the number has exactly one digit.

\mathit{dr}(n)=n \Leftrightarrow n \in \{0,1,2,3,4,5,6,7,8,9\}.

The digital root of n is less than n if and only if the number is greater than or equal to 10.

\mathit{dr}(n)<n \Leftrightarrow n \ge 10.

The digital root of a + b is congruent with the sum of the digital root of a and the digital root of b modulo 9.

\mathit{dr}(a+b) \equiv \mathit{dr}(a)+\mathit{dr}(b) \pmod{9}.

The digital root of a - b is congruent with the difference of the digital root of a and the digital root of b modulo 9.

\mathit{dr}(a-b) \equiv \mathit{dr}(a)-\mathit{dr}(b) \pmod{9}.

The digital root of a × b is congruent with the multiple of the digital root of a and the digital root of b modulo 9.

\mathit{dr}(a \times b) \equiv \mathit{dr}(a)\times\mathit{dr}(b) \pmod{9}.
\mathit{dr}(n)=9 \Leftrightarrow n=9m \ \ \ \text{for}\  m=1,2,3,\cdots.
\begin{align} \mathit{dr}(n) &=3 \Leftrightarrow n=9m+3 & \ \text{for}\  m=0,1,2,\cdots,\\ \mathit{dr}(n) &=6 \Leftrightarrow n=9m+6 & \ \text{for}\  m=0,1,2,\cdots,\\ \mathit{dr}(n) &=9 \Leftrightarrow n=9m   & \ \text{for}\  m=1,2,3,\cdots.\end{align}
\mathit{dr}(n!)=9 \Leftrightarrow n \ge 6.
\mathit{dr}(a^n) \equiv \mathit{dr}^n(a) \pmod{9}.

See also

References

External links