Digit sum

Source: Wikipedia, the free encyclopedia.

In

decimal number
would be

Definition

Let be a natural number. We define the digit sum for base , to be the following:

where is one less than the number of digits in the number in base , and

is the value of each digit of the number.

For example, in

base 10
, the digit sum of 84001 is

For any two bases and for sufficiently large natural numbers

[1]

The sum of the base 10 digits of the integers 0, 1, 2, ... is given by OEISA007953 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.[2]

Extension to negative integers

The digit sum can be extended to the negative integers by use of a signed-digit representation to represent each integer.

Properties

The amount of n-digit numbers with digit sum q can be calculated using:

Applications

The concept of a decimal digit sum is closely related to, but not the same as, the

divisible by 3 or 9 if and only if its digit sum (or digital root) is divisible by 3 or 9, respectively. For divisibility by 9, this test is called the rule of nines and is the basis of the casting out nines
technique for checking calculations.

Digit sums are also a common ingredient in

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.

See also

References

  1. JSTOR 2304217
    .
  2. JSTOR 2324993, archived from the original
    (PDF) on 2016-05-09, retrieved 2009-03-02.
  3. .
  4. ^ Edgeworth, F. Y. (1888), "The Mathematical Theory of Banking" (PDF), Journal of the Royal Statistical Society, 51 (1): 113–127, archived from the original (PDF) on 2006-09-13.