7,8 |  |

Authors: Bronnitsyn M. Tolpno A.K.

a) Can any six-digit number starting with the digit 5 be extended by adding 6 more digits so that the resulting 12-digit number is a perfect square?

b) The same question for a number starting with 1.

c) Find for each $n$ the smallest $k=k(n)$ such that any $n$-digit number can be extended by adding $k$ more digits so that the resulting $(n+k)$-digit number is a perfect square.
a) Let's take an arbitrary number ending in zeros, the square of which is a 12-digit number starting with 5, for example $A=750000$

$\left(A^{2}=5625 \cdot 10^{8}\right)$. Since $(A-1)^{2}=A^{2}-2 A+1$, the square preceding $A^{2}$ is $562500000000-2 \cdot 750000$ $+1=562498500001$. Therefore, a 12-digit square starting with the digits 562499 does not exist.

b) Let $A^{2}$ be a 12-digit number starting with 1, that is, $10^{11} \leq A^{2}<2 \cdot 10^{11}$. The neighboring squares differ from $A^{2}$ by $2 A-1$ and $2 A+1$, and $2 A<2 \cdot \sqrt{20} \cdot 10^{5}<900000$. Therefore, the difference between neighboring squares is less than a million, so in the sequence of consecutive squares between $10^{11}$ and $2 \cdot 10^{11}$, there will be numbers starting with each set of six digits.

c) To any $n$ digits, one can append another $n+1$ digit so that the resulting number of $2 n+1$ digits is a perfect square. Indeed, in the range from $10^{2 n}$ to $10^{2 n+1}$, the difference between neighboring squares does not exceed $2 \sqrt{10} \cdot 10^{n}+1<10^{n+1}$.

We will prove that $k(n) \geq n+1$. Consider the square preceding $10^{2 n}$: $\left(10^{n}-1\right)^{2}=10^{2 n}-2 \cdot 10^{n}+1=\underbrace{9 \ldots 9}_{n-1} \underbrace{90 \ldots 01}_{n-1}$. Thus, to the number $\underbrace{9 \ldots 9}_{n}$, it is impossible to append $n$ digits to form a square. It is also clear that it is impossible to append $n-2, n-4, \ldots$ digits: the corresponding number is too close to $\left(10^{n-1}\right)^{2},\left(10^{n-2}\right)^{2}, \ldots$ Therefore, $k(n) \neq n$ (and also $n-2, n-4, \ldots$).

Consider the square preceding $\left(2 \cdot 10^{n-1}\right)^{2}:\left(2 \cdot 10^{n-1}-1\right)^{2}=3 \underbrace{39960 \ldots 01}_{n-2} \underbrace{}_{n-2}$. Thus, to the number $3 \underbrace{39 \ldots} 7$, it is impossible to append $n-1$ (and also $n-3, n-5, \ldots$) digits to form a square, so $k(n)$ $\neq n-1(n-3, n-5, \ldots)$.

## Answer

a) Not to any; b) to any; c) $k(n)=n+1$.