I've been asked to find all values of $x$ such that $1234x6789$ is divisible by $9$
I feel that I'm supposed to use modulo or bases but I have no real direction.
I've been asked to find all values of $x$ such that $1234x6789$ is divisible by $9$
I feel that I'm supposed to use modulo or bases but I have no real direction.
Theorem: If a $y \in \mathbb{N}$ is divisible by $9$, then the sum of the digits of $y$ is divisible by $9$.
Proof: We are assuming that $y \equiv 0 \pmod{9}$. Write $y = \displaystyle \sum_{k=0}^n c_k10^k$ for $c_k \in \{1, 2, ...,9 \}$ and apply rules of modular arithmetic: because $10 \equiv 1 \pmod{9}$, we arrive at $\displaystyle \sum_{k=0}^n c_k \equiv 0 \pmod{9}$.
Note that these steps are reversible, so this is an if and only if criterion.
The sum of all digits should be divisible by 9.
Note that $10^n\equiv 1$ (mod $9$) for all $n$.
Let $\overline{abcd}\in\mathbb{N}$ and $9\mid\overline{abcd}$. This implies that $9\mid(a+b+c+d)$. Similar proof, but with 3.
Knowing the rule, we now must calculate the constant sum of digits of $\overline{1234x6789}$ (excluding $x$), which we denote $s$:$$s=(\sum_{k=1}^{9}k) - 5 = \frac{9 \cdot10}{2} - 5 = 40$$
Now, we should use the divisibility theorem for $9$, in our case:$$9\mid\overline{1234x6789}\implies9\mid (s+x)\tag1$$
The minimum value of $(s+x)$ is $40$, for $x=0$ and the maximum value of $(s+x)$ is 49, for $x=9$. $$(s+x)\in[40;49]\tag2$$
From (1),(2) and knowing that the only natural multiple of $9$ in the range $[40;49]$ is obviously $45$: $$(s+x)=45\implies x = 45-s\implies x=5$$
Thus, $x\in \{5\}$.