2014 SMO (Open-Rd1) 15. Find the largest even four-digit perfect square whose units digit exceeds the tens digit by 1 and whose thousands digit exceeds the hundreds digit by 1.
The smallest four-digit perfect square is while the largest is . Hence, there are 99 – 32 + 1 = 68 cases to check in an exhaustive search. We can strike out about half of them since we are only looking for even perfect squares. So, if you are really desperate, exhaustive search may not be too bad an idea (and I would recommend starting from and working downwards since we are looking for the biggest one).
Let’s work out a better way. Let the perfect square be . It is quite clear that must be a 2-digit number, so let , where and each represent a digit from 0 to 9 (inclusive). Then,
Let’s worry about the condition concerning the thousands & hundreds digit later: conditions concerning the tens & ones digit are generally a lot easier to tackle. What can the expression above tell us about the ones and tens digit?
First, only the term contributes to the ones digit, hence the choice of completely determines the ones digit. Since must be even, we have 5 choices for : 0, 2, 4, 6 and 8. However, the ones digit must be greater than 0 (why?), hence cannot be 0.
Next, the and terms both contribute to the tens digit. However, notice that the term always contributes an even number to the tens digit. Hence, in order for the tens digit to be one less than the ones digit, it must be odd and so the term must contribute an odd number to the tens digit. This rules out and , so is either 4 or 6.
We have significantly reduced the number of cases! Now let’s go through each of them.
Case 1: b = 4.
In order for the tens digit to be 5, must be 3 or 8. However, and both do not satisfy the condition concerning the thousands and hundreds digit.
Case 2: b = 6.
In order for the tens digit to be 5, must be 1 or 6. is not even 4 digits, while satisfies all the given conditions.
Hence, the answer is 4356. (In fact, it is the only 4-digit even perfect square to satisfy the given conditions.)