Fairer and Squarer

10 2 2 = 10404 102^2 = 10404 and 20 1 2 = 40401 201^2 = 40401 are five-digit perfect squares, which only differ from each other in that their first and last digits have been interchanged.

It is easy to find more examples of this type:

  • 10 3 2 = 10609 103^2 = 10609 and 30 1 2 = 90601 301^2 = 90601
  • 20 3 2 = 41206 203^2 = 41206 and 30 2 2 = 61204. 302^2 = 61204.

How many more pairs of such five-digit perfect squares are there (other than the above 3 pairs)?


For a four-digit version, see this problem .

There are no other pairs One other pair Two other pairs Three other pairs

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Arjen Vreugdenhil
Aug 20, 2017

Let the two squares be 10000 M 2 < N 2 99999 10000 \leq M^2 < N^2 \leq 99999 . We conclude immediately that 100 M , N 316 ; { 200 N + M 632 N M 216 100 \leq M,N \leq 316;\ \ \ \ \ \ \begin{cases} 200 \leq N+M \leq 632 \\ N-M \leq 216\end{cases} Now let a a and e e be the first and last digit of N N ; then N 2 M 2 = 10000 ( a e ) + ( e a ) = 9999 ( a e ) = : 9999 h . N^2 - M^2 = 10000(a-e) + (e-a) = 9999(a - e) =: 9999h. Using the factorization 9999 = 3 2 11 101 9999 = 3^2\cdot 11\cdot 101 , we conclude that ( N + M ) ( N M ) = 3 2 11 101 h (N+M)(N-M) = 3^2\cdot 11\cdot 101\cdot h with h = 1 , , 8 h = 1, \dots, 8 . Answers to the problem must be found among solutions of this equation. Note also that N + M N+M and N M N-M must have the same parity (odd or even). If they are both even, we necessarily have h = 4 h = 4 or 8 8 .

The prime factor 101 101 must be either a divisor of N + M N+M or of N M N-M .

Case 1. 101 101 is a divisor of N + M N+M . This implies N + M = 202 , 303 , 404 , 505 , or 606 N+M = 202, 303, 404, 505,\ \text{or}\ 606 .

If N + M = 303 N+M = 303 or 606 606 , then we see that 3 11 = 33 3\cdot 11 = 33 must be a divisor of N M N-M . Knowing that N M 216 N-M \leq 216 and that N + M N+M and N M N-M have the same parity, this leaves the following possibilities:

N + M N M N M N 2 M 2 303 33 168 135 28224 18225 no match 303 99 201 102 40401 10404 SOLUTION (already known) 303 165 234 69 M too small 606 66 336 N too large 606 132 idem 606 198 idem \begin{array}{cc|cc|cc|l} N+M & N-M & N & M & N^2 & M^2 & \\ \hline 303 & 33 & 168 & 135 & 28224 & 18225 & \text{no match} \\ 303 & 99 & 201 & 102 & 40401 & 10404 & \text{SOLUTION (already known)} \\ 303 & 165 & 234 & 69 & \dots & \dots & M\ \text{too small} \\ \hline 606 & 66 & 336 & \dots & \dots & \dots & N\ \text{too large} \\ 606 & 132 & & & & & \text{idem} \\ 606 & 198 & & & & & \text{idem} \\ \hline \end{array}

If N + M N + M is another multiple of 101 101 , we conclude that 3 2 11 = 99 3^2\cdot 11 = 99 must be a divisor of N M N-M . This means that N M = 99 N-M = 99 if N + M N+M is odd, and 198 198 if N + M N+M is even.

N + M N M N M N 2 M 2 202 198 2 M too small 404 198 301 103 90601 10609 SOLUTION (already known) 505 99 302 203 91204 41209 SOLUTION (already known) \begin{array}{cc|cc|cc|l} N+M & N-M & N & M & N^2 & M^2 & \\ \hline 202 & 198 & \dots & 2 & \dots & \dots & M\ \text{too small} \\ 404 & 198 & 301 & 103 & 90601 & 10609 & \text{SOLUTION (already known)} \\ 505 & 99 & 302 & 203 & 91204 & 41209 & \text{SOLUTION (already known)} \\ \hline \end{array}

Case 2. 101 101 is a divisor of N M N-M . This implies N M = 101 N-M = 101 or 202 202 . It follows that 3 2 11 = 99 3^2\cdot 11 = 99 is a divisor of N + M N+M . This gives the following possibilities:

N + M N M N M N 2 M 2 297 101 199 98 M too small 396 202 299 97 M too small 495 101 298 197 88804 38809 no match 594 202 398 N too large \begin{array}{cc|cc|cc|l} N+M & N-M & N & M & N^2 & M^2 & \\ \hline 297 & 101 & 199 & 98 & \dots & \dots & M\ \text{too small} \\ 396 & 202 & 299 & 97 & \dots & \dots & M\ \text{too small} \\ 495 & 101 & 298 & 197 & 88804 & 38809 & \text{no match} \\ 594 & 202 & 398 & \dots & \dots & \dots & N\ \text{too large} \\ \hline \end{array}

Conclusion. Beyond the three solution already shown in the problem, we found no other pairs \boxed{\text{no other pairs}} of five-digit perfect squares with this property.

Giorgos K.
Jan 3, 2018

Mathematica

For[x = 100, x < 317, x++, For[y = x + 1, y < 317, y++, If[IntegerDigits[x^2][[{1, 5}]] == IntegerDigits[y^2][[{5, 1}]] && IntegerDigits[x^2][[{2, 3, 4}]] == IntegerDigits[y^2][[{2, 3, 4}]], Print[x, " ", y]]]]

102 201
103 301
203 302

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...