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 35,79E is 2, because 3 + 5 + 7 + 9 + E = 2E and 2 + E = 11 and 1 + 1 = 2.
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.
The digital root of a square is 1, 3, 4, 5, 9 or E (thus, we can know that 987,654 is not a square, since its digital root is 6), but the digital root of a cube can be any number.