Maths Olympiad Prep

Library / IMO Shortlist /305 of 365

IMO Shortlist

Number theory Difficulty 8.9 Shortlist Prove it IMO

Determine whether there exists an infinite sequence of nonzero digits a1,a2,a3,…a_{1}, a_{2}, a_{3}, \ldots and a positive integer NN such that for every integer k>Nk > N, the number akak−1…a1‾\overline{a_{k} a_{k-1} \ldots a_{1}} is a perfect square.

Solutions — 2

Solution 1

Answer. No.

Assume that a1,a2,a3,…a_{1}, a_{2}, a_{3}, \ldots is such a sequence. For each positive integer kk, let yk=akak−1…a1‾y_{k}= \overline{a_{k} a_{k-1} \ldots a_{1}}. By the assumption, for each k>Nk > N there exists a positive integer xkx_{k} such that yk=xk2y_{k}=x_{k}^{2}.

I. For every nn, let 5γn5^{\gamma_{n}} be the greatest power of 55 dividing xnx_{n}. Let us show first that 2γn⩾n2 \gamma_{n} \geqslant n for every positive integer n>Nn > N.

Assume, to the contrary, that there exists a positive integer n>Nn > N such that 2γn<n2 \gamma_{n} < n, which yields
yn+1=an+1an…a1‾=10nan+1+anan−1…a1‾=10nan+1+yn=52γn(2n5n−2γnan+1+yn52γn). y_{n+1}=\overline{a_{n+1} a_{n} \ldots a_{1}}=10^{n} a_{n+1}+\overline{a_{n} a_{n-1} \ldots a_{1}}=10^{n} a_{n+1}+y_{n}=5^{2 \gamma_{n}}\left(2^{n} 5^{n-2 \gamma_{n}} a_{n+1}+\frac{y_{n}}{5^{2 \gamma_{n}}}\right) .
Since 5∤yn/52γn5 \nmid y_{n} / 5^{2 \gamma_{n}}, we obtain γn+1=γn<n<n+1\gamma_{n+1}=\gamma_{n}<n<n+1. By the same arguments we obtain that γn=γn+1=γn+2=…\gamma_{n}=\gamma_{n+1}=\gamma_{n+2}=\ldots. Denote this common value by γ\gamma.

Now, for each k⩾nk \geqslant n we have
(xk+1−xk)(xk+1+xk)=xk+12−xk2=yk+1−yk=ak+1⋅10k \left(x_{k+1}-x_{k}\right)\left(x_{k+1}+x_{k}\right)=x_{k+1}^{2}-x_{k}^{2}=y_{k+1}-y_{k}=a_{k+1} \cdot 10^{k}
One of the numbers xk+1−xkx_{k+1}-x_{k} and xk+1+xkx_{k+1}+x_{k} is not divisible by 5γ+15^{\gamma+1} since otherwise one would have 5γ+1∣((xk+1−xk)+(xk+1+xk))=2xk+15^{\gamma+1} \mid \left(\left(x_{k+1}-x_{k}\right)+\left(x_{k+1}+x_{k}\right)\right)=2 x_{k+1}. On the other hand, we have 5k∣(xk+1−xk)(xk+1+xk)5^{k} \mid \left(x_{k+1}-x_{k}\right)\left(x_{k+1}+x_{k}\right), so 5k−γ5^{k-\gamma} divides one of these two factors. Thus we get
5k−γ⩽max⁡{xk+1−xk,xk+1+xk}<2xk+1=2yk+1<2⋅10(k+1)/2 5^{k-\gamma} \leqslant \max \left\{x_{k+1}-x_{k}, x_{k+1}+x_{k}\right\}<2 x_{k+1}=2 \sqrt{y_{k+1}}<2 \cdot 10^{(k+1) / 2}
which implies 52k<4⋅52γ⋅10k+15^{2 k}<4 \cdot 5^{2 \gamma} \cdot 10^{k+1}, or (5/2)k<40⋅52γ(5 / 2)^{k}<40 \cdot 5^{2 \gamma}. The last inequality is clearly false for sufficiently large values of kk. This contradiction shows that 2γn⩾n2 \gamma_{n} \geqslant n for all n>Nn > N.

II. Consider now any integer k>max⁡{N/2,2}k > \max \{N / 2, 2\}. Since 2γ2k+1⩾2k+12 \gamma_{2 k+1} \geqslant 2 k+1 and 2γ2k+2⩾2k+22 \gamma_{2 k+2} \geqslant 2 k+2, we have γ2k+1⩾k+1\gamma_{2 k+1} \geqslant k+1 and γ2k+2⩾k+1\gamma_{2 k+2} \geqslant k+1. So, from y2k+2=a2k+2⋅102k+1+y2k+1y_{2 k+2}=a_{2 k+2} \cdot 10^{2 k+1}+y_{2 k+1} we obtain 52k+2∣y2k+2−y2k+1=a2k+2⋅102k+15^{2 k+2} \mid y_{2 k+2}-y_{2 k+1}=a_{2 k+2} \cdot 10^{2 k+1} and thus 5∣a2k+25 \mid a_{2 k+2}, which implies a2k+2=5a_{2 k+2}=5. Therefore,
(x2k+2−x2k+1)(x2k+2+x2k+1)=x2k+22−x2k+12=y2k+2−y2k+1=5⋅102k+1=22k+1⋅52k+2. \left(x_{2 k+2}-x_{2 k+1}\right)\left(x_{2 k+2}+x_{2 k+1}\right)=x_{2 k+2}^{2}-x_{2 k+1}^{2}=y_{2 k+2}-y_{2 k+1}=5 \cdot 10^{2 k+1}=2^{2 k+1} \cdot 5^{2 k+2} .
Setting Ak=x2k+2/5k+1A_{k}=x_{2 k+2} / 5^{k+1} and Bk=x2k+1/5k+1B_{k}=x_{2 k+1} / 5^{k+1}, which are integers, we obtain
(Ak−Bk)(Ak+Bk)=22k+1 \begin{equation*} \left(A_{k}-B_{k}\right)\left(A_{k}+B_{k}\right)=2^{2 k+1} \tag{1} \end{equation*}
Both AkA_{k} and BkB_{k} are odd, since otherwise y2k+2y_{2 k+2} or y2k+1y_{2 k+1} would be a multiple of 1010 which is false by a1≠0a_{1} \neq 0; so one of the numbers Ak−BkA_{k}-B_{k} and Ak+BkA_{k}+B_{k} is not divisible by 44. Therefore (1) yields Ak−Bk=2A_{k}-B_{k}=2 and Ak+Bk=22kA_{k}+B_{k}=2^{2 k}, hence Ak=22k−1+1A_{k}=2^{2 k-1}+1 and thus
x2k+2=5k+1Ak=10k+1⋅2k−2+5k+1>10k+1 x_{2 k+2}=5^{k+1} A_{k}=10^{k+1} \cdot 2^{k-2}+5^{k+1}>10^{k+1}
since k⩾2k \geqslant 2. This implies that y2k+2>102k+2y_{2 k+2}>10^{2 k+2} which contradicts the fact that y2k+2y_{2 k+2} contains 2k+22 k+2 digits. The desired result follows.

Solution 2

Again, we assume that a sequence a1,a2,a3,…a_{1}, a_{2}, a_{3}, \ldots satisfies the problem conditions, introduce the numbers xkx_{k} and yky_{k} as in the previous solution, and notice that
yk+1−yk=(xk+1−xk)(xk+1+xk)=10kak+1 \begin{equation*} y_{k+1}-y_{k}=\left(x_{k+1}-x_{k}\right)\left(x_{k+1}+x_{k}\right)=10^{k} a_{k+1} \tag{2} \end{equation*}
for all k>Nk > N. Consider any such kk. Since a1≠0a_{1} \neq 0, the numbers xkx_{k} and xk+1x_{k+1} are not multiples of 1010, and therefore the numbers pk=xk+1−xkp_{k}=x_{k+1}-x_{k} and qk=xk+1+xkq_{k}=x_{k+1}+x_{k} cannot be simultaneously multiples of 2020, and hence one of them is not divisible either by 44 or by 55. In view of (2), this means that the other one is divisible by either 5k5^{k} or by 2k−12^{k-1}. Notice also that pkp_{k} and qkq_{k} have the same parity, so both are even.

On the other hand, we have xk+12=xk2+10kak+1⩾xk2+10k>2xk2x_{k+1}^{2}=x_{k}^{2}+10^{k} a_{k+1} \geqslant x_{k}^{2}+10^{k}>2 x_{k}^{2}, so xk+1/xk>2x_{k+1} / x_{k}>\sqrt{2}, which implies that
1<qkpk=1+2xk+1/xk−1<1+22−1<6 \begin{equation*} 1<\frac{q_{k}}{p_{k}}=1+\frac{2}{x_{k+1} / x_{k}-1}<1+\frac{2}{\sqrt{2}-1}<6 \tag{3} \end{equation*}
Thus, if one of the numbers pkp_{k} and qkq_{k} is divisible by 5k5^{k}, then we have
10k+1>10kak+1=pkqk⩾(5k)26 10^{k+1}>10^{k} a_{k+1}=p_{k} q_{k} \geqslant \frac{\left(5^{k}\right)^{2}}{6}
and hence (5/2)k<60(5 / 2)^{k}<60 which is false for sufficiently large kk. So, assuming that kk is large, we get that 2k−12^{k-1} divides one of the numbers pkp_{k} and qkq_{k}. Hence
{pk,qk}={2k−1⋅5rkbk,2⋅5k−rkck} with nonnegative integers bk,ck,rk such that bkck=ak+1. \left\{p_{k}, q_{k}\right\}=\left\{2^{k-1} \cdot 5^{r_{k}} b_{k}, 2 \cdot 5^{k-r_{k}} c_{k}\right\} \quad \text{ with nonnegative integers } b_{k}, c_{k}, r_{k} \text{ such that } b_{k} c_{k}=a_{k+1} .
Moreover, from (3) we get
6>2k−1⋅5rkbk2⋅5k−rkck⩾136⋅(25)k⋅52rk and 6>2⋅5k−rkck2k−1⋅5rkbk⩾49⋅(52)k⋅5−2rk 6>\frac{2^{k-1} \cdot 5^{r_{k}} b_{k}}{2 \cdot 5^{k-r_{k}} c_{k}} \geqslant \frac{1}{36} \cdot\left(\frac{2}{5}\right)^{k} \cdot 5^{2 r_{k}} \quad \text{ and } \quad 6>\frac{2 \cdot 5^{k-r_{k}} c_{k}}{2^{k-1} \cdot 5^{r_{k}} b_{k}} \geqslant \frac{4}{9} \cdot\left(\frac{5}{2}\right)^{k} \cdot 5^{-2 r_{k}}
so
αk+c1<rk<αk+c2 for α=12log⁡5(52)<1 and some constants c2>c1. \begin{equation*} \alpha k+c_{1}<r_{k}<\alpha k+c_{2} \quad \text{ for } \alpha=\frac{1}{2} \log _{5}\left(\frac{5}{2}\right)<1 \text{ and some constants } c_{2}>c_{1} . \tag{4} \end{equation*}
Consequently, for C=c2−c1+1−α>0C=c_{2}-c_{1}+1-\alpha>0 we have
(k+1)−rk+1⩽k−rk+C \begin{equation*} (k+1)-r_{k+1} \leqslant k-r_{k}+C \tag{5} \end{equation*}
Next, we will use the following easy lemma.

Lemma. Let ss be a positive integer. Then 5s+2s≡5s( mod 10s)5^{s+2^{s}} \equiv 5^{s}\left(\bmod 10^{s}\right).

Proof. Euler's theorem gives 52s≡1( mod 2s)5^{2^{s}} \equiv 1\left(\bmod 2^{s}\right), so 5s+2s−5s=5s(52s−1)5^{s+2^{s}}-5^{s}=5^{s}\left(5^{2^{s}}-1\right) is divisible by 2s2^{s} and 5s5^{s}.

Now, for every large kk we have
xk+1=pk+qk2=5rk⋅2k−2bk+5k−rkck≡5k−rkck( mod 10rk) \begin{equation*} x_{k+1}=\frac{p_{k}+q_{k}}{2}=5^{r_{k}} \cdot 2^{k-2} b_{k}+5^{k-r_{k}} c_{k} \equiv 5^{k-r_{k}} c_{k} \quad\left(\bmod 10^{r_{k}}\right) \tag{6} \end{equation*}
since rk⩽k−2r_{k} \leqslant k-2 by (4); hence yk+1≡52(k−rk)ck2( mod 10rk)y_{k+1} \equiv 5^{2\left(k-r_{k}\right)} c_{k}^{2}\left(\bmod 10^{r_{k}}\right). Let us consider some large integer ss, and choose the minimal kk such that 2(k−rk)⩾s+2s2\left(k-r_{k}\right) \geqslant s+2^{s}; it exists by (4). Set d=2(k−rk)−(s+2s)d=2\left(k-r_{k}\right)-\left(s+2^{s}\right). By (4) we have 2s<2(k−rk)<(2α−2)rk−2c1α2^{s}<2\left(k-r_{k}\right)<\left(\frac{2}{\alpha}-2\right) r_{k}-\frac{2 c_{1}}{\alpha}; if ss is large this implies rk>sr_{k}>s, so (6) also holds modulo 10s10^{s}. Then (6) and the lemma give
yk+1≡52(k−rk)ck2=5s+2s⋅5dck2≡5s⋅5dck2( mod 10s) \begin{equation*} y_{k+1} \equiv 5^{2\left(k-r_{k}\right)} c_{k}^{2}=5^{s+2^{s}} \cdot 5^{d} c_{k}^{2} \equiv 5^{s} \cdot 5^{d} c_{k}^{2} \quad\left(\bmod 10^{s}\right) \tag{7} \end{equation*}
By (5) and the minimality of kk we have d⩽2Cd \leqslant 2 C, so 5dck2⩽52C⋅81=D5^{d} c_{k}^{2} \leqslant 5^{2 C} \cdot 81=D. Using 54<1035^{4}<10^{3} we obtain
5s⋅5dck2<103s/4D<10s−1 5^{s} \cdot 5^{d} c_{k}^{2}<10^{3 s / 4} D<10^{s-1}
for sufficiently large ss. This, together with (7), shows that the ssth\text{th} digit from the right in yk+1y_{k+1}, which is asa_{s}, is zero. This contradicts the problem condition.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.