Very squary number

Logic Level 2

What is the largest positive integer for which all pairs of its consecutive digits are perfect squares?


The answer is 81649.

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.

4 solutions

Arjen Vreugdenhil
Dec 20, 2015

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. 8 \to 1 \to 6 \to 4 \to 9; \ 2 \to 5; \ 3 \to 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 81649 \boxed{81649} .

Ravi Dwivedi
Dec 28, 2015

The two-digit perfect squares are 16 , 25 , 36 , 49 , 64 , 81 16, 25, 36, 49, 64, 81 . Consider

16 64 49 16 - 64 - 49 giving us 1649 1649 .

25 25 .No two digit square starts with 5 5 so this gives 25 25

36 64 49 36 - 64 - 49 , we get 3649 3649 .

49 49 .

64 49 , 64 - 49, gives 649 649 .

81 16 64 49 81 - 16 - 64 - 49 gives 81649 81649 .

So the greatest of all is 81649 \boxed{81649}

Moderator note:

Good that you checked all possible starting values.

Parth Chowdhary
Dec 28, 2015

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

Arjen Vreugdenhil - 5 years, 5 months ago

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.

Gustavo Cardenas - 5 years, 5 months ago
Ramiel To-ong
Jan 9, 2016

nice solution

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...