4

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.

Ghartal
  • 4,348

2 Answers2

2

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.}$

Oscar Lanzi
  • 48,208
YNK
  • 4,620
1

Since $100 \le \overline{CDE} < \sqrt{\overline{ABCDE}} \le \sqrt{99999} \approx 316.226$, we must have $C \in \lbrace 1, 2, 3 \rbrace$.

Doing arithmetic modulo 10, we have $E = 4B^2 + E^2$. This can be broken down into three cases:

  • $B \in \lbrace 0, 5 \rbrace \implies 4B^2 = 0 \implies E = E^2 \implies E \in \lbrace 0, 1, 5, 6 \rbrace$
  • $B \in \lbrace 1, 4, 6, 9 \rbrace \implies 4B^2 = 4 \implies E = 4 + E^2 \implies E \in \lbrace 3, 8 \rbrace$
  • $B \in \lbrace 2, 3, 7, 8 \rbrace \implies 4B^2 = 6 \implies E = 6 + E^2 \implies$ no solutions for E

This gives us 16 possible combinations for B and E:

$$(B, E) \in \lbrace (0, 0), (0, 1), (0, 5), (0, 6), (1, 3), (1, 8), (4, 3), (4, 8), (5, 0), (5, 1), (5, 5), (5, 6), (6, 3), (6, 8), (9, 3), (9, 8) \rbrace$$

There may be some clever way to narrow down the options for A and D, but I can't think of one at the moment, so I'll just use brute-force for those. With 3 choices for C, 16 choices for BE, 9 choices for A (it can't be zero), and 10 for D, that gives 4320 valid combinations, of which only two satisfy the original equation:

$$\overline{ABCDE} \in \lbrace 19133, 70225 \rbrace$$

Both solutions use two letters to represent the same digit ($D=E=3$ or $C=D=2$). If, however, all five letters are required to have distinct values, then there are no solutions.

Dan
  • 18,262