>>11548763Number = dn*10^n +dn-1*10^n-1 ...+d1*10 + d0= d0 + d1 +9*d1 + d2 +99*d2... + dn + 9999...9999*dn.
It can be easily shown that every of the 9, 99, 999... is divisible by 3. So for each i summand di*9...9 is divisible by 3. So what is left in the sum is d0 + d1+... +dn that is, the sum of the digits of number.
Then if number i. E. Left side is divisible by 3, right side must be also, so the sum of its digits is divisible by 3.
If sum of digits of a number is divisible by 3, then so is right side of the equation (sum of digits plus di times nines, since each of the summands we know is divisible by 3). It equals the actual number so both implications of iff hold. By 9 is identical, in every place of 3 put 9 in the text above