A3. What is the largest integer for which each pair of consecutive digits is a square?
Solution
Two digit squares can only start with $1,2,3,4,6$ or 8 .
The sequence starting 2 goes $2 \rightarrow 5$ and then can't continue while the sequences starting with 3 or 1 go 3 (or 1 ) $\rightarrow 6 \rightarrow 4 \rightarrow 9$ and so are longer than any sequence starting with 4 or 6 . However, the sequence starting with 8 is $8 \rightarrow 1 \rightarrow 6 \rightarrow 4 \rightarrow 9$ which is the longest. Therefore, 81649 is the largest integer.