When I was a kid I learned about the rule which says that if a number has a decimal digit sum divisible by $3$, then it is divisible by $3$. For example $123$ has digit sum $6$ and is $3\times 41$ whereas $321$ also has digit sum $6$ and is $3\times 107$.
Now to my question...
Does there exist any general result where if working in an integer base $b$:
$$n = \sum_k d_k b^k$$
If the sum of digits $\sum_k d_k$ can tell us whether $n$ is divisible by some integer (except for the trivial $b^m$, of course)
Answer
Observe that $b^k-1$ is divisible by $b-1$, so $b-1$ divides $n$ if and only if $b-1$ divides $\sum_k d_k$.
Not that useful for $b=2$. In the case $b=10$ you get standard divisibility by $9$.
Similarly, $b+1$ divides $n$ if and only if $b+1$ divides
$$
\sum_k (-1)^kd_k
$$
No comments:
Post a Comment