Digit Sum

In mathematics, the digit sum of a given integer is the sum of all its digits, (e.g.: the digit sum of 84001 is calculated as 8+4+0+0+1 = 13). Digit sums are most often computed using the decimal representation of the given number, but they may be calculated in any other base; different bases give different digit sums, with the digit sums for binary being on average smaller than those for any other base.

Let S(r,N) be the digit sum for radix r of all non-negative integers less than N. For any 2 ≤ r1 < r2 and for sufficiently large N, S(r1,N) < S(r2,N).

The sum of the decimal digits of the integers 0, 1, 2, ... is given by  A007953 in the On-Line Encyclopedia of Integer Sequences. Borwein & Borwein (1992) use the generating function of this integer sequence (and of the analogous sequence for binary digit sums) to derive several rapidly-converging series with rational and transcendental sums.

The concept of a decimal digit sum is closely related to, but not the same as, the digital root, which is the result of repeatedly applying the digit sum operation until the remaining value is only a single digit. The digital root of any non-zero integer will be a number in the range 1 to 9, whereas the digit sum can take any value. Digit sums and digital roots can be used for quick divisibility tests: a natural number is divisible by 3 or 9 if and only if its digit sum (or digital root) is divisible by 3 or 9, respectively.

Digit sums are also a common ingredient in checksum algorithms and were used in this way to check the arithmetic operations of early computers. Earlier, in an era of hand calculation, Edgeworth (1888) suggested using sums of 50 digits taken from mathematical tables of logarithms as a form of random number generation; if one assumes that each digit is random, then by the central limit theorem, these digit sums will have a random distribution closely approximating a Gaussian distribution.

The digit sum of the binary representation of a number is known as its Hamming weight or population count; algorithms for performing this operation have been studied, and it has been included as a built-in operation in some computer architectures and some programming languages. These operations are used in computing applications including cryptography, coding theory, and computer chess.

Harshad numbers are defined in terms of divisibility by their digit sums, and Smith numbers are defined by the equality of their digit sums with the digit sums of their prime factorizations. Perry (2005) studies the question of how many integers are mapped to the same value by the sum-of-digits function.

6% of the numbers below 100000 have a digit sum of 23, which is along with 22 the most common digit sum within this limit.

Famous quotes containing the words digit and/or sum:

    Bless my soul, Sir, will you Britons not credit that an American can be a gentleman, & have read the Waverly Novels, tho every digit may have been in the tar-bucket?
    Herman Melville (1819–1891)

    To sum up:
    1. The cosmos is a gigantic fly-wheel making 10,000 revolutions a minute.
    2. Man is a sick fly taking a dizzy ride on it.
    3. Religion is the theory that the wheel was designed and set spinning to give him the ride.
    —H.L. (Henry Lewis)