A cryptogram Diophantine $\overline{ABCDE}=4 \ \overline{AB}^2+\overline{CDE}^2$

contest-mathcryptarithmdiophantine equationselementary-number-theorynumber theory

ABCDE is a 5-digit number. AB and CDE are 2-digit and 3-digit numbers respectively.

$\overline{ABCDE}=4 \ \overline{AB}^2+\overline{CDE}^2$

Find all possible values of $\overline{ABCDE}$.

Honestly, I designed this problem just for fun, and I tried everything to solve it. It seems that there is a neat solution around. I will be very happy if you take a look at it.

Best Answer

We convert the given equation to the following form. $$1000(AB)+(CDE)=4(AB)^2+(CDE)^2. $$

Now consider the following quadratic equation. $$(CDE)^2-(CDE)+4(AB)^2-1000(AB)=0$$

The two roots of this equation are, $$(CDE)=\dfrac{1\pm \sqrt{1-16(AB)^2+4000(AB)}}{2}.$$

Since $(AB)$ is a 2-digit number, $10\le (AB)\le 99$. For all these values of (AB), $$\sqrt{1-16(AB)^2+4000(AB)} \gt 1$$.

Therefore, we have, $$(CDE)=\dfrac{1+ \sqrt{1-16(AB)^2+4000(AB)}}{2}.$$

Now, we have to find out the values of $(AB)$, for which the expression under the square-root sign is a square. They turn out to be, $$(AB)=19\qquad\text{and}\qquad (AB)=70.$$*

The corresponding values of $(CDE)$ are, $$(CDE)=133\qquad\text{and}\qquad (CDE)=225.$$


*Here is how to get these values of $\overline{AB}$:

First complete the square in the discriminant. This gives

$1-16(\overline{AB})^2+4000\overline{AB}=250001-(4\overline{AB}-500)^2.$

Thus we must have

$250001=m^2+(4\overline{AB}-500)^2$.

Since $250001=500^2+1^2$ where the squares are relatively prime, the odd number must be a product of $4n+1$ primes only. Trial divisions then yield the factorization

$250001=53^2×89=(7^2+2^2)^2(8^2+5^2).$

We now consider Gaussian-integer products of the form

$(7\pm2i)(7\pm2i)(8\pm5i).$

Each product has real and imaginary parts whose squares sum to $250001$. Wlog we may take the first factor to be specifically $7+2i$, and we find three combinations giving different squares:

$(7+2i)(7+2i)(8+5i)=220+449i$

$(7+2i)(7+2i)(8-5i)=500-i$

$(7+2i)(7-2i)(8\pm5i)=424\pm265i.$

The first product above gives

$250001=220^2+449^2,$

from which $4\overline{AB}-500$ which is a multiple of $4$ must be $\pm220$. We choose the negative possibility to force $\overline{AB}<100$, so we then find

$\color{blue}{\overline{AB}=70.}$

The third product similarly gives the other nonzero value for $\overline{AB}$:

$\color{blue}{\overline{AB}=19.}$

Related Question