Digit Sum
A digit sum s_b(n) is a sum of the base-b digits of n. The base-10 digit sum of the integer n is implemented in the Wolfram Language as DigitSum[n], and the base-b digit sum as DigitSum[n, b].
The following table gives s_b(n) for n=1, 2, ... and small b.
Plots of the digit sums of first thousand positive integers are illustrated above for bases 2 to 10.
Plotting s_b(n) versus b and n gives the plot shown above.
The digits sum s_b(n) satisfies the congruence
| n=s_b(n) (mod b-1). |
(1)
|
In base 10, this congruence is the basis of casting out nines and of fast divisibility tests such as those for 3 and 9.
s_b(n) satisfies the following unexpected identity
the b=2 case of which was given in the 1981 Putnam competition (Allouche 1992). In addition,
(OEIS A100044 and A100045; Allouche 1992, Allouche and Shallit 1992).
Let u(n) be the number of digit blocks of 11 in the binary expansion of n, then
(OEIS A100046; Allouche 1992).
Sondow (2006) noted the unexpected identity
| [画像: product_(n=0)^inftyproduct_(k=1,3,...)^(b-1)((nb+k)/(nb+k+1))^((-1)^(s_b(n)))=1/(sqrt(b)). ] |
(6)
|
The special case of b=2 corresponds to a Thue-Morse sequence product (J. Sondow, pers. comm., Oct. 31, 2006).
The numbers 1, 81, 1458 and 1729 (OEIS A110921) are each the product of their own digit sum and its reversal, for example 1+7+2+9=19, and 19×91=1729. These are the only four numbers with this property, as proved by Fujiwara (Fujiwara and Ogawa 2005).
See also
Casting Out Nines, Digital Root, Digit, Digit Block, Digit Count, Digit Product, Divisibility TestsRelated Wolfram sites
https://functions.wolfram.com/NumberTheoryFunctions/DigitCount/Portions of this entry contributed by Topher Cooper
Explore with Wolfram|Alpha
More things to try:
References
Allouche, J.-P. "Series and Infinite Products Related to Binary Expansions of Integers." 1992. https://algo.inria.fr/seminars/sem92-93/allouche.pdf.Allouche, J.-P. and Shallit, J. "The Ring of k-Regular Sequences." Theor. Comput. Sci. 98, 163-197, 1992.Fujiwara, M. and Ogawa, Y. Introduction to Truly Beautiful Mathematics. Tokyo: Chikuma Shobo, 2005.Grabner, P. J.; Herendi, T.; and Tichy, R. F. "Fractal Digital Sums and Codes." Appl. Algebra Engrg. Comm. Comput. 8, 33-39, 1997.Shallit, J. O. "On Infinite Products Associated with Sums of Digits." J. Number Th. 21, 128-134, 1985.Sloane, N. J. A. Sequences A000120/M0105, A007953, A053735, A053737, A053824, A053827, A053828, A053829, A053830, A100044, A100045, and A100046 in "The On-Line Encyclopedia of Integer Sequences."Sondow, J. "Problem 11222." Amer. Math. Monthly 113, 459, 2006.Trott, M. The Mathematica GuideBook for Programming. New York: Springer-Verlag, p. 218, 2004. https://www.mathematicaguidebooks.org/.Referenced on Wolfram|Alpha
Digit SumCite this as:
Cooper, Topher and Weisstein, Eric W. "Digit Sum." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/DigitSum.html