Maths Olympiad Prep

Library / /387 of 520

Number theory Difficulty 7.2 National olympiad, round 2 Find the answer

Consider a sequence {an}n0\{a_n\}_{n\geq 0} such that an+1=anan (n0), a00a_{n+1}=a_n-\lfloor{\sqrt{a_n}}\rfloor\ (n\geq 0),\ a_0\geq 0.

(1) If a0=24a_0=24, then find the smallest nn such that an=0a_n=0.

(2) If a0=m2 (m=2, 3, )a_0=m^2\ (m=2,\ 3,\ \cdots), then for jj with 1jm1\leq j\leq m, express a2j1, a2ja_{2j-1},\ a_{2j} in terms of j, mj,\ m.

(3) Let m2m\geq 2 be integer and for integer pp with 1pm11\leq p\leq m-1, let a\0=m2pa\0=m^2-p. Find kk such that ak=(mp)2a_k=(m-p)^2, then
find the smallest nn such that an=0a_n=0.

A number or a short expression. Spacing and $ signs are ignored.

Solution

### Part 1:
1. Given a0=24 a_0 = 24 , we need to find the smallest n n such that an=0 a_n = 0 .
2. We calculate the sequence step-by-step:
a0=24,a1=a0a0=2424=244=20,a2=a1a1=2020=204=16,a3=a2a2=1616=164=12,a4=a3a3=1212=123=9,a5=a4a4=99=93=6,a6=a5a5=66=62=4,a7=a6a6=44=42=2,a8=a7a7=22=21=1,a9=a8a8=11=11=0. \begin{aligned} &a_0 = 24, \\ &a_1 = a_0 - \lfloor \sqrt{a_0} \rfloor = 24 - \lfloor \sqrt{24} \rfloor = 24 - 4 = 20, \\ &a_2 = a_1 - \lfloor \sqrt{a_1} \rfloor = 20 - \lfloor \sqrt{20} \rfloor = 20 - 4 = 16, \\ &a_3 = a_2 - \lfloor \sqrt{a_2} \rfloor = 16 - \lfloor \sqrt{16} \rfloor = 16 - 4 = 12, \\ &a_4 = a_3 - \lfloor \sqrt{a_3} \rfloor = 12 - \lfloor \sqrt{12} \rfloor = 12 - 3 = 9, \\ &a_5 = a_4 - \lfloor \sqrt{a_4} \rfloor = 9 - \lfloor \sqrt{9} \rfloor = 9 - 3 = 6, \\ &a_6 = a_5 - \lfloor \sqrt{a_5} \rfloor = 6 - \lfloor \sqrt{6} \rfloor = 6 - 2 = 4, \\ &a_7 = a_6 - \lfloor \sqrt{a_6} \rfloor = 4 - \lfloor \sqrt{4} \rfloor = 4 - 2 = 2, \\ &a_8 = a_7 - \lfloor \sqrt{a_7} \rfloor = 2 - \lfloor \sqrt{2} \rfloor = 2 - 1 = 1, \\ &a_9 = a_8 - \lfloor \sqrt{a_8} \rfloor = 1 - \lfloor \sqrt{1} \rfloor = 1 - 1 = 0. \end{aligned}
3. Therefore, the smallest n n such that an=0 a_n = 0 is 9 \boxed{9} .

### Part 2:
1. We claim that a2j=(mj)2 a_{2j} = (m-j)^2 for all 1jm 1 \leq j \leq m . We will prove this by induction.
2. Base Case:
a0=m2,a1=a0a0=m2m,a2=a1a1=(m2m)(m1)=(m1)2. \begin{aligned} &a_0 = m^2, \\ &a_1 = a_0 - \lfloor \sqrt{a_0} \rfloor = m^2 - m, \\ &a_2 = a_1 - \lfloor \sqrt{a_1} \rfloor = (m^2 - m) - (m - 1) = (m - 1)^2. \end{aligned}
Thus, the base case holds.
3. Inductive Step:
Assume a2k=(mk)2 a_{2k} = (m-k)^2 for some k k . We need to show a2k+2=(mk1)2 a_{2k+2} = (m-k-1)^2 .
a2k+1=a2ka2k=(mk)2(mk)=m2m(2k+1)+k2+k,a2k+2=a2k+1a2k+1. \begin{aligned} &a_{2k+1} = a_{2k} - \lfloor \sqrt{a_{2k}} \rfloor = (m-k)^2 - (m-k) = m^2 - m(2k+1) + k^2 + k, \\ &a_{2k+2} = a_{2k+1} - \lfloor \sqrt{a_{2k+1}} \rfloor. \end{aligned}
Since (mk1)2a2k+1(mk)2 (m-k-1)^2 \leq a_{2k+1} \leq (m-k)^2 , we have a2k+1=mk1 \lfloor \sqrt{a_{2k+1}} \rfloor = m-k-1 .
a2k+2=a2k+1(mk1)=(m2m(2k+1)+k2+k)(mk1)=m2m(2k+2)+k2+2k+1=(mk1)2. \begin{aligned} &a_{2k+2} = a_{2k+1} - (m-k-1) = (m^2 - m(2k+1) + k^2 + k) - (m-k-1) \\ &= m^2 - m(2k+2) + k^2 + 2k + 1 = (m-k-1)^2. \end{aligned}
Thus, the induction is complete.
4. Using the fact that a2j2=(mj+1)2 a_{2j-2} = (m-j+1)^2 for all 2jm 2 \leq j \leq m , we have:
a2j1=a2j2a2j2=(mj+1)2(mj+1)=(mj+1)(mj). \begin{aligned} &a_{2j-1} = a_{2j-2} - \lfloor \sqrt{a_{2j-2}} \rfloor = (m-j+1)^2 - (m-j+1) \\ &= (m-j+1)(m-j). \end{aligned}
Therefore, a2j1=(mj+1)(mj) \boxed{a_{2j-1} = (m-j+1)(m-j)} and a2j=(mj)2 \boxed{a_{2j} = (m-j)^2} .

### Part 3:
1. Let a0=m2p a_0 = m^2 - p . We need to find k k such that ak=(mp)2 a_k = (m-p)^2 .
2. We calculate the sequence step-by-step:
a0=m2p,a1=a0a0=m2pm2p. \begin{aligned} &a_0 = m^2 - p, \\ &a_1 = a_0 - \lfloor \sqrt{a_0} \rfloor = m^2 - p - \lfloor \sqrt{m^2 - p} \rfloor. \end{aligned}
Since m2p=m1 \lfloor \sqrt{m^2 - p} \rfloor = m - 1 (as p p is small), we have:
a1=m2p(m1)=m2m+1p. \begin{aligned} &a_1 = m^2 - p - (m - 1) = m^2 - m + 1 - p. \end{aligned}
3. We continue this process until we reach (mp)2 (m-p)^2 . The sequence will eventually reach (mp)2 (m-p)^2 after 2p 2p steps.
4. Therefore, the smallest n n such that an=0 a_n = 0 is 2m1 \boxed{2m - 1} .

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

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.