Skip to main content
OlympiadHQ

Browse · MathNet

Print

Estonian Mathematical Olympiad

Estonia number theory

Problem

Call a positive integer interesting if both the sum of digits of and the sum of digits of are perfect squares, whereas and have the same number of digits. Find all positive integers for which there exists an interesting -digit number.
Solution
For any positive integer , let denote the sum of digits of . Clearly unless the last digit of is zero. The only two consecutive integers that are both perfect squares are and , but is impossible for a positive . The contradiction shows that the last digit of must be and the last digit of must be .

Let be an interesting positive integer that ends with exactly digits . Clearly . Note that a perfect square is congruent to , , or modulo . As , we must have and . But is impossible, because this would require to be a power of , in the case of which and would not consist of the same number of digits. Thus , as is the next smallest perfect square congruent to modulo . But as , we have . This implies that must contain at least digits. Containing exactly digits would be possible only if consisted entirely of nines, but in such case would contain one more digit. Hence must contain at least digits.

Consider now the -digit number . In this case , and , thus is interesting. Inserting zeros between and does not influence and . So we can obtain an -digit interesting number for every .
Final answer
all integers k ≥ 10

Techniques

OtherIntegers