A positive integer is called mystical if it has at least two digits and every pair of two consecutive digits, read from left to right, forms a perfect square. For example, 364 is a mystical integer because 36 and 64 are both perfect squares, but 325 is not mystical because 32 is not a perfect square. What is the largest mystical integer?
The two-digit perfect squares are $16,25,36,49,64$, and 81 .

Notice that no two of these perfect squares have a common first digit, which means that in a mystical integer, either a digit is the rightmost digit or there is only one possibility for the digit to its right.

This means, for each possible first digit, the largest mystical integer with that first digit is the mystical integer with as many digits as possible.

To make a mystical integer starting with 1 have as many digits as possible, we must follow the 1 by a 6 , which must be followed by 4 and then 9 . No two-digit perfect square starts with 9 , so 1649 is the longest, and hence, the largest mystical integer with its first digit equal to 1.

The only mystical integer with its first digit equal to 2 is 25 since no two-digit perfect square has a first digit of 5 .

The longest mystical integer starting with 3 is 3649 .

The longest mystical integer starting with 4 is 49 .

There are no mystical integers starting with 5,7 , or 9 .

The longest mystical integer with a first digit of 6 is 649 .

The longest mystical integer starting with 8 is 81649 . This is the only five-digit mystical integer, so it must be the largest.

ANSWER: 81649