What is the largest positive integer for which all pairs of its consecutive digits are perfect squares?
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.
The two-digit perfect squares are 1 6 , 2 5 , 3 6 , 4 9 , 6 4 , 8 1 . Consider
1 6 − 6 4 − 4 9 giving us 1 6 4 9 .
2 5 .No two digit square starts with 5 so this gives 2 5
3 6 − 6 4 − 4 9 , we get 3 6 4 9 .
4 9 .
6 4 − 4 9 , gives 6 4 9 .
8 1 − 1 6 − 6 4 − 4 9 gives 8 1 6 4 9 .
So the greatest of all is 8 1 6 4 9
Good that you checked all possible starting values.
For the number to be greater, the first digit on the left-hand side should be the greatest. So, we get 9. But there is no two digit perfect square with ten's digit as 9. So, we go down to 8. We have one such perfect square - 81. So, from the left-hand side, our first two digits are 8 and 1. Now, from 1, the only number is 16. So, our number becomes 816... From 6, we get 64. So, our number becomes 8164... From 4, we get 49. So, our number becomes 81649... But, from 9, there is no perfect square and thus, we stop. Our final answer is 81649.
Don't worry about the first digit on the left-- first you should worry about the length of the number. After all, a 5-digit number starting in 1 is greater than a 3-digit number starting in 9...
Your answer is right but your reasoning has a flow. You said that the left-most digit should be the greatest to have the greatest number, but you are not considering the number of digits. What if there was a valid result that starts with 7 and has six digits? It would be greater than your answer but the left-most digit would be smaller. You have to prove that your answer is indeed the greatest one.
Problem Loading...
Note Loading...
Set Loading...
For every non-zero digit, there is at most one possible next digit. The complete set of possibilities is 8 → 1 → 6 → 4 → 9 ; 2 → 5 ; 3 → 6 . 7 does not occur in any two-digit perfect square. Since we do not start a number with zero and no perfect square between 0 and 100 ends in zero, we can also rule out the use of zeroes.
Thus the longest number satisfying the condition is 8 1 6 4 9 .