Show that the number 9 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 9.
Show that the number 3 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 3.
Are semigroup and monoid theory could be useful?