Divisibility by $8$ and $9$.

76 Views Asked by At

How many ordered pairs $(a,b)$ exist such that the four-digit number, $a04b$, is divisible by both $8$ and $9$?

How should I approach this? (without modular arithmetic?)

2

There are 2 best solutions below

3
On BEST ANSWER

the number $\overline{a04b}$ is divisible by $8$ if and only if $\overline{04b}$ is divisible by $8$, so we must have $b=0$ or $b=8$.Notice that the numbers $\{1,2,3,4,5,6,8,9\}$ are a complete residue system $\bmod 9$, so it doesn't matter which case we pick,there is only one option for $a$.

So there are two such numbers.

0
On

We can write:

$$a04b=1000\cdot a+100\cdot 0+10\cdot 4+b$$

Once $1000$ and $40$ are divisible by $8$ then $b$ must be divisible by $8$ and then $b=8$.

For division by $9$ we can write:

$$a048= 999\cdot a + a+40+8$$

Once $999$ is divisible by $9$ then $a+48$ has to be divisible by $9$. Once $0\le a\le 9$ the only value that fits is $a=6$.