2

I'm a aware there's another question about this problem. However, it is a general question of the form "how can one prove this property, with an incomplete proof attached, and not a proof verification such as mine. My proof is not present in the aforementioned question nor in its answers.

I was requested to prove the following property:

$\text{If the number formed by the last two digits of $x$ is divisible }$$\text{by $4$, then $x$ is divisible by $4$.}$

I'm self-studying discrete mathematics and was wondering if someone could validate my proof. Here's what I did.


$\text{Lemma :}$ $\forall n>1|2^n \equiv 0 \pmod{4}$.

$\text{pf.}$ The base case is trivial. Assume $2^k=4q, k>1$. Then $2^{k+1}=2^k\cdot 2=4q \cdot2 = 8q$ is divisible by four. Then $4|2^n$ for all $n > 1$.

$\text{Solution :}$

Notice that

$$ x=x_{n-1}10^{n-1}+...+x_110+x_0 = \sum_{i=0}^{n-1} x_i10^i \tag{1} $$

where $(x_{n-1}x_{n-2}...x_1x_0)_{10}$ is the representation of $x$ in base $10.$

It is clear that $10 \equiv 2 \pmod{4}$ and therefore $x_i10^i \equiv x_i2^i \pmod{4}$. Particularly, for the last two digits of $x,$ we have $x_110+x_0 \equiv2x_1+x_0$. Generally, for $x$ we get

$$ x\equiv \sum_{i=0}^{n-1} x_i10^i \equiv \sum_{i=0}^n x_i2^i \pmod{4} \tag{2} $$

Assume $4|(x_12+x_0)$ or rather $x_12+x_0 \equiv 0 \pmod{4}$. Then

$$\begin{align} x\equiv \sum_{i=0}^nx_i2^i \equiv x_12+x_0+\sum_{i=2}^nx_i2^i \equiv0\end{align}$$

The result follows from our assumption and from the fact that our lemma guarantees $\sum_{i=2}^{n}x_i2^i \equiv 0\pmod{4}$. This suffices to show $4|(x_i10+x_0) \implies 4|x$.


Is this proof correct? Thanks in advance.

Angelo
  • 12,328
lafinur
  • 3,322
  • 4
    Your proof seems clean and correct to me, however this can be shortened. – lone student Nov 15 '22 at 17:49
  • For a faster proof consider $344=3\cdot 100+44$. – CyclotomicField Nov 15 '22 at 17:55
  • 5
    Yes, but maybe a shorter proof is $(100x + y) ,,\text{mod}, 4 = y ,,\text{mod},, 4$, for $x\in\mathbb{N}$. – Peter Franek Nov 15 '22 at 17:57
  • 2
    One has to sympathize with poor students. If they make a proof too short they are chastised for not going into enough detail but when the go into detail they are chastised for including too many extraneous details. – fleablood Nov 15 '22 at 18:24
  • @fleablood, that was an argument that I frequently had with my colleagues when I teaching. They were often too wrapped with how they would solve a problem to see that our students were using a different path. – S. A. Lloyd Nov 15 '22 at 18:31
  • 1
    I'm always appreciative of suggestions and improvements, thank you everybody. – lafinur Nov 15 '22 at 18:37
  • Special case of $,4\mid a + 100b\iff 4\mid a,,$ by $,a+100b\equiv a\pmod{!4}$ and divisibility mod reduction in the linked dupe. $\ \ $ – Bill Dubuque Nov 15 '22 at 19:10
  • @S.A.Lloyd I was going to complain this was way too and too much detail and all we had to do was state as $4|100$ it all follows much more simply, but then I realized the OP was going in such detail just for such a purpose and the proof wasn't extraneous after all. It was merely being thorough. – fleablood Nov 16 '22 at 01:48

1 Answers1

1

A shorter proof :

Let $\;\big(x_{n-1}x_{n-2}...x_1x_0\big)_{\!10}\;$ be the representation of $\,x\,$ in base $\,10\;$ where $\;n\geqslant3\;$ and $\;x_{n-1}\neq0\;.$

Since $\displaystyle\;x=\sum_\limits{i=0}^{n-1}10^ix_i=x_0+10x_1+10^2\!\cdot\!\sum_\limits{i=2}^{n-1}10^{i-2}x_i\;,\;$ by letting $\displaystyle\;\lambda=25\!\cdot\!\sum_\limits{i=2}^{n-1}10^{i-2}x_i\in\mathbb N\;,\;$ we get that

$\color{blue}{x=x_0+10x_1+4\lambda}\;.$

Moreover ,

if $\;x_0+10x_1\;$ is divisible by $\,4\,,\;$ then there exists $\;\mu\in\mathbb N_0\;$ such that $\;x_0+10x_1=4\mu\;,\;$ hence $\;x=4\left(\mu+\lambda\right)\;,\;$ consequently , $\;x\,$ is divisible by $\,4$.

Angelo
  • 12,328