5. Determine the sum of all four-digit numbers in which every two consecutive digits form a square of a natural number. (For example, 164 is such a three-digit number because 16 and 64 are squares of the numbers 4 and 8).

## Tasks worth 10 points:
5. Determine the sum of all four-digit numbers in which every two consecutive digits form a square of a natural number. (For example, 164 is such a three-digit number because 16 and 64 are squares of the numbers 4 and 8).

## Solution.

Two-digit squares are 16, 25, 36, 49, 64, and $81. \quad 1$ POINT

If we start with 16, the sequence becomes 16, 64, 49, and the four-digit number 1649. 1 POINT

If we start with 36, the sequence becomes 36, 64, 49, and the four-digit number 3649. 1 POINT

If we start with 81, the sequence becomes 81, 16, 64, and the four-digit number $8164. \quad 1$ POINT

If we start with 25, the sequence is interrupted because there is no two-digit square that starts with the digit 5.

If we start with 49, the sequence is interrupted because there is no two-digit square that starts with the digit 9.

If we start with 64, the sequence becomes 64, 49, forming the three-digit number 649, and the sequence is interrupted because there is no two-digit square that starts with the digit 9. 1 POINT Thus, the desired numbers are 1649, 3649, and 8164.

$1649+3649+8164=13462$

$1 \text{POINT}$
TOTAL 6 POINTS

Note 1: A student who lists the desired numbers 1649, 3649, and 8164 without explanation can earn a maximum of 2 POINTS in this part of the task instead of 3 POINTS.

Note 2: A student who, in any way, does not comment on the attempts to form sequences with 25, 49, and 64 can earn a maximum of 5 POINTS.