Showing x is only equally divisible

42 Views Asked by At

This is the background information I got to work with.

$X$ is a positive integer and can be written as $X_pX_{p-1} ... X_1X_0$ for the numbers $X_i \in \{0,1,2,3,4,5,6,7,8,9\}$ and $i=0,1,...,p$.

How do I show that $X$ is only equally divisible (that is gives a remainder of $0$) if and only if $X_0$ is $0$ or $5$?

1

There are 1 best solutions below

2
On BEST ANSWER

With your notations, one has $X = X_p \cdot 10^p + X_{p-1} \cdot 10^{p-1} + \dots + X_1 \cdot 10^1 + X_0 \cdot 10^0$, for short : $$X = \sum_{i=0}^p X_i\cdot 10^i$$ All terms of this sum except $X_0 \cdot 10^0=X_0$ are divisible by 10, hence by 5.

So, $X_0$ is divisible by 5 (that is, $X_0=5$ or $X_0=0$) iff $X$ is divisible by 5.