My question is slightly more complicated than what's implied on the title, so I will start with an example. Given any number $N$ on base $10$, we can easily determine whether or not $N$ is divisible by any $d\in[2,9]$, except for $d=7$:
- $N$ is divisible by $2$ if $N\bmod10$ is divisible by $2$
- $N$ is divisible by $3$ if $N$'s digit-sum is divisible by $3$
- $N$ is divisible by $4$ if $N\bmod100$ is divisible by $4$
- $N$ is divisible by $5$ if $N\bmod10$ is divisible by $5$
- $N$ is divisible by $6$ if $N$ is divisible by $2$ and $3$
- $N$ is divisible by $8$ if $N\bmod1000$ is divisible by $8$
- $N$ is divisible by $9$ if $N$'s digit-sum is $9$
In the case of $d=7$, we pretty much have to perform a full division (at least for some values of $N$).
I believe that the general rule for base $B$ and $d\in[2,B-1]$ is the following:
[We can easily determine $d|N_B]\iff[\gcd(B,d)>1]\vee[gcd(B-1,d)>1]$
Is there an easy way to prove or refute this?
Partial answers will also be appreciated:
- [We can easily determine $d|N_B]\impliedby[\gcd(B,d)>1]$
- [We can easily determine $d|N_B]\impliedby[[gcd(B-1,d)>1]$
- [We can easily determine $d|N_B]\implies[\gcd(B,d)>1]\vee[gcd(B-1,d)>1]$
The $1^{st}$ one is pretty trivial, I believe that the $2^{nd}$ one also holds, but I'm not sure about the $3^{rd}$ one.