You can decide whether a number is divisible by 3 by forming its cross sum,
that is the sum of all its decimal digits: It is divisible by three exactly if its cross sum is. Similarly, a threedigit number is
divisible by seven if (and only if) the sum of twice its most significant
digit plus three times its middle digit plus its least significant digit is
divisible by seven.
Can you find a similar scheme for checking divisibility by 33 and 37, for numbers with an arbitrary number of digits?
Let N = u0 + u1x10 + u2x10^2 + u3x10^3 + ... + ukx10^k.
N is divisble by 37 if sum of u(3j) digits + 10 times sum of
u(3j+1) digits  11 times sum of u(3j+2) digits is divisible by 37.
Example: 37x15768=583416. (6+3) + 10x(1+8)  11x(4+5)=0.

Posted by Dennis
on 20061025 10:32:05 