Suppose $n=917,4X8,835$ where X is the missing digit. Find possible values of $X$ so that $n$ is divisible by each of the integers:
$${2,3,9,25}.$$
I'm a bit confused by the inconsistency by validating if it's possible with the integers.
For example, when checking if it's divisible by $2$ then it just states "$2$ cannot divide $n$, because $2 \nmid 5$ so therefore $2 \nmid n$ for any $X$." Fair enough makes sense.
But then for finding an $X$ that divides $n$ by $3$, then it states "If the sum of all the digits in $n$ is divisible by $3$ then it is divisible by $3$." Which also makes sense, but how come we couldn't do that for $2$ as well? $3 \nmid 5$ as well so if I apply the same logic from $2$ then then there can't be an $X$ right? I don't really understand what's going on. Same with when finding an $X$ that divides it by $9$, shouldn't the last digit need to be dividable by $9$? Then for checking for divisibility by $25$ it just checks the last $2$ digits($35$) is divisible by $25$. Can anyone explain why this is?
In what cases do you check if the "last k digits" are divisible by an integer that is k digits long? What cases do you sum up digits of $n$ and find the $X\in[0,9]$ that makes the sum divisible by the integer?
Some hints on divisibility rules
You may need some knowledge in modular arithmetic.
Let $x\in\mathbb{N}$ then we can express $x$ as $$ x=\sum_{i=0}^{n}a_i\cdot 10^i, \quad \text{where}\quad a_i\in\{0,1,2,\ldots,9\}. $$
So
$$ x=a_0\cdot10^0+a_1\cdot 10^1+\ldots +a_n\cdot 10^n $$
and for divisbility by $3$ let us reduce $x$ modulo $3$, which means we substitute for each number with the rest after we divided said number by $3$.
$$ 10=3\cdot 3+1 $$
that is the rest is $1$, so $10\equiv 1\ \bmod 3$ which means.
$$ x=a_0\cdot10^0+a_1\cdot 10^1+\ldots +a_n\cdot 10^n\to x=a_0\cdot1^0+a_1\cdot 1^1+\ldots +a_n\cdot 1^n= $$ $$ =a_0+a_1+\ldots+a_n $$
which means that $x$ and the same rest when divided by $3$ as the sum of its digits which in turn means that if the digitsum is divisible then the number is also.
The exact same argument works for divisibility by $9$.
Divisibility by $11$ is also a fun one, I challenge you to try out yourself (HINT: $11\equiv -1\ \bmod 10$)