a) Describe all number systems in which a number is divisible by 2 if and only if the sum of its digits is divisible by 2.

b) Solve the problem, replacing the modulus 2 with an arbitrary natural number \( m > 1 \).
Comparison $a_{n} q^{n}+\ldots+a_{1} q+a_{0} \equiv a_{n}+\ldots+a_{1}+a_{0}(\bmod m)$ is equivalent to the comparison $a_{n}\left(q^{n}-1\right)+\ldots+a_{1}(q-1) \equiv$ $0(\bmod m)$, which holds independently of $a_{i}$ if and only if $q-1 \equiv 0(\bmod m)$. In particular, for $m=2$, a system with any odd base is suitable.

## Answer

a) Systems with an odd base; b) $q=1+m k(k \geq 1)$.