Maths Olympiad Prep

Track / Stage 8 / 179 of 180 #1879 of 1964

Problem 1879

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.9 Prove it International Mathematical Olympiad Shortlisted Problems · 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 akak1a1\overline{a_{k} a_{k-1} \ldots a_{1}} is a perfect square.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official 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=akak1a1y_{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γnn2 \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+1ana1=10nan+1+anan1a1=10nan+1+yn=52γn(2n5n2γ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 5yn/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 knk \geqslant n we have
(xk+1xk)(xk+1+xk)=xk+12xk2=yk+1yk=ak+110k \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+1xkx_{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+1xk)+(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+1xk)(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+1xk,xk+1+xk}<2xk+1=2yk+1<210(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<452γ10k+15^{2 k}<4 \cdot 5^{2 \gamma} \cdot 10^{k+1}, or (5/2)k<4052γ(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γnn2 \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+12k+12 \gamma_{2 k+1} \geqslant 2 k+1 and 2γ2k+22k+22 \gamma_{2 k+2} \geqslant 2 k+2, we have γ2k+1k+1\gamma_{2 k+1} \geqslant k+1 and γ2k+2k+1\gamma_{2 k+2} \geqslant k+1. So, from y2k+2=a2k+2102k+1+y2k+1y_{2 k+2}=a_{2 k+2} \cdot 10^{2 k+1}+y_{2 k+1} we obtain 52k+2y2k+2y2k+1=a2k+2102k+15^{2 k+2} \mid y_{2 k+2}-y_{2 k+1}=a_{2 k+2} \cdot 10^{2 k+1} and thus 5a2k+25 \mid a_{2 k+2}, which implies a2k+2=5a_{2 k+2}=5. Therefore,
(x2k+2x2k+1)(x2k+2+x2k+1)=x2k+22x2k+12=y2k+2y2k+1=5102k+1=22k+152k+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
(AkBk)(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 a10a_{1} \neq 0; so one of the numbers AkBkA_{k}-B_{k} and Ak+BkA_{k}+B_{k} is not divisible by 44. Therefore (1) yields AkBk=2A_{k}-B_{k}=2 and Ak+Bk=22kA_{k}+B_{k}=2^{2 k}, hence Ak=22k1+1A_{k}=2^{2 k-1}+1 and thus
x2k+2=5k+1Ak=10k+12k2+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 k2k \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+1yk=(xk+1xk)(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 a10a_{1} \neq 0, the numbers xkx_{k} and xk+1x_{k+1} are not multiples of 1010, and therefore the numbers pk=xk+1xkp_{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 2k12^{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+1xk2+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/xk1<1+221<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 2k12^{k-1} divides one of the numbers pkp_{k} and qkq_{k}. Hence
{pk,qk}={2k15rkbk,25krkck} 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>2k15rkbk25krkck136(25)k52rk and 6>25krkck2k15rkbk49(52)k52rk 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 α=12log5(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=c2c1+1α>0C=c_{2}-c_{1}+1-\alpha>0 we have
(k+1)rk+1krk+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+2s5s(mod10s)5^{s+2^{s}} \equiv 5^{s}\left(\bmod 10^{s}\right).

Proof. Euler's theorem gives 52s1(mod2s)5^{2^{s}} \equiv 1\left(\bmod 2^{s}\right), so 5s+2s5s=5s(52s1)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=5rk2k2bk+5krkck5krkck(mod10rk) \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 rkk2r_{k} \leqslant k-2 by (4); hence yk+152(krk)ck2(mod10rk)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(krk)s+2s2\left(k-r_{k}\right) \geqslant s+2^{s}; it exists by (4). Set d=2(krk)(s+2s)d=2\left(k-r_{k}\right)-\left(s+2^{s}\right). By (4) we have 2s<2(krk)<(2α2)rk2c1α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+152(krk)ck2=5s+2s5dck25s5dck2(mod10s) \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 d2Cd \leqslant 2 C, so 5dck252C81=D5^{d} c_{k}^{2} \leqslant 5^{2 C} \cdot 81=D. Using 54<1035^{4}<10^{3} we obtain
5s5dck2<103s/4D<10s1 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 ss\text{th} digit from the right in yk+1y_{k+1}, which is asa_{s}, is zero. This contradicts the problem condition.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.