Talk:Digit sum
From Wikipedia, the free encyclopedia
Would be nice if someone could add a more generalised rule to the mod 9 for base 10. I'm sure it would just be mod (base-1) but the answer could be more tricky to interpret. For example, in binary ds(101) = 10? Syndicate 10:45, 23 October 2005 (UTC)
- May I add some results for base 10?
Let σ(M) be the digit sum of positive integer M. We all know from casting nines that σ(9k+r)=r.
Suppose we want to find σ(3141592653589792718281828459045). Let us state some basic operations and some periodicities:
σ(A+B)=σ(A)+σ(B); σ(A×B)=σ(A)×σ(B); σ(Aa)=[σ(A)]a, σ(26k+j)=1,2,4,8,7,5 for j=0,1,2,3,4,5, respectively. σ(3k)=1,3,9 for k=0,1 and k not smaller than 2, respectively. σ(43k+j)=1,4,7 for j=0,1,2, respectively. σ(56k+j)=1,5,7,8,4,2 for j=0,1,2,3,4,5, respectively. σ(6k)=1,6,9 for k=0,1 and k not smaller than 2, respectively. σ(73k+j)=1,7,4 for j=0,1,2, respectively. σ(82k+j)=1,8 for j=0,1, respectively.
For the example, 314159265358979=9m+5, and 2718281828459045=6k+5, so
σ(3141592653589792718281828459045)=σ(55)=2.
69.158.119.184 18:41, 16 September 2006 (UTC)