The number 37 trick - generalization

69 Views Asked by At

Suppose we have a number $aaa\ldots a$ composed of $k$ equal digits $a$ in base $b$. Let's divide the number by the sum of its digits. When do we get an integer result?

I am reading a book which implies that this happens when $k$ divides $(b-1)$. I can see why this condition is sufficient, but somehow my intuition tells me that the condition is not necessary.

Is it also necessary? If not what is the necessary condition and why?

1

There are 1 best solutions below

2
On

Take the following example for $k=4$ and $b=7$:

$$5555_7=2000_{10}$$

Sum of digits is $4\times5=20$ and $20\mid2000$. But $k\nmid (b-1)$.