markp@tekmdp.UUCP (Mark Paulin) (08/26/83)
The sum of the digits of a number N is called the "digital root" of N, dr(N). One way to show that, in base k, N = dr(N) mod (k-1) is to apply the so-called "synthetic division" algorithm to [the formal polynomial in k which is defined by the base k representation of a number, and (k-1)]. To wit: When we divide the polynomial N = a(n)k**n + a(n-1)k**(n-1) +...+ a(2)k**2 + a(1)k + a(0) by (k-1) using synthetic division we obtain N = Q(k-1) + R where R = a(n) + a(n-1) +...+ a(2) + a(1) + a(0) = dr(N) thus N = dr(N) mod (k-1) ////. The same argument, mutatis mutandis, will show that a number N in base k is divisible by (k+1) if and only if the alternating sum of its digits is divisible by (k+1). Mark Paulin ...tektronix!tekmdp!markp