Maths Olympiad Prep

Track / Stage 6 / 371 of 400 #1371 of 1964

Problem 1371

National olympiad, first round
Combinatorics Difficulty 6.8 Prove it 62nd Czech and Slovak Mathematical Olympiad · Czech Republic

Let p(n)p(n) denote the number of all nn-digit positive integers containing only the digits 11, 22, 33, 44, 55 and such that every two adjacent digits differ by at least 22. Prove that for every positive integer nn,
52.4n1p(n)52.5n1. 5 \cdot 2.4^{n-1} \le p(n) \le 5 \cdot 2.5^{n-1}.

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

Cutting off the last digit of a satisfactory (n+1)(n + 1)-digit integer yields a satisfactory nn-digit integer. Notice how a satisfactory (n+1)(n + 1)-digit integer can be constructed from a satisfactory nn-digit integer. If the last digit of the integer is 11, we can append any of the digits 33, 44, 55. If the last digit is 22, we can append 44 or 55; if it is 33, 11 or 55 can be appended; if it is 44, 11 or 22 can be appended; and, finally, in the case of 55, we can append any of the digits 11, 22, 33. Thus we can see that only the last digit matters. So now, let ana_n denote the number of satisfactory nn-digit integers ending in 11 or 55; similarly bnb_n for 22 or 44, and cnc_n for integers ending in 33. Then p(n)=an+bn+cnp(n) = a_n + b_n + c_n. Apparently, a1=b1=2a_1 = b_1 = 2, c1=1c_1 = 1, p(1)=5=52.40=52.50p(1) = 5 = 5 \cdot 2.4^0 = 5 \cdot 2.5^0, a2=6a_2 = 6, b2=4b_2 = 4, c2=2c_2 = 2, p(2)=12=52.41<52.51p(2) = 12 = 5 \cdot 2.4^1 < 5 \cdot 2.5^1.
The above reasoning implies the recurrent formulae
an+1=an+bn+2cn,bn+1=an+bn,cn+1=an.(1) a_{n+1} = a_n + b_n + 2c_n, \quad b_{n+1} = a_n + b_n, \quad c_{n+1} = a_n. \quad (1)
Hence it follows that a3=14a_3 = 14, b3=10b_3 = 10, c3=6c_3 = 6, p(3)=30(52.42;52.52)p(3) = 30 \in (5 \cdot 2.4^2; 5 \cdot 2.5^2).
Using mathematical induction, we prove that for every n3n \ge 3, it holds that
an2.4n,bn232.4n,cn2.4n1. a_n \ge 2.4^n, \quad b_n \ge \frac{2}{3} \cdot 2.4^n, \quad c_n \ge 2.4^{n-1}.
It indeed does for n=3n = 3. If an2.4na_n \ge 2.4^n, bn232.4nb_n \ge \frac{2}{3} \cdot 2.4^n and cn2.4n1c_n \ge 2.4^{n-1}, then also
an+1=an+bn+2cn2.4n+232.4n+22.4n1==2.4n(1+23+56)=2.52.4n>2.4n+1,bn+1=an+bn2.4n+232.4n=532.4n>232.4n+1,cn+1=an2.4n. \begin{align*} a_{n+1} &= a_n + b_n + 2c_n \ge 2.4^n + \frac{2}{3} \cdot 2.4^n + 2 \cdot 2.4^{n-1} = \\ &= 2.4^n \cdot \left(1 + \frac{2}{3} + \frac{5}{6}\right) = 2.5 \cdot 2.4^n > 2.4^{n+1}, \\ b_{n+1} &= a_n + b_n \ge 2.4^n + \frac{2}{3} \cdot 2.4^n = \frac{5}{3} \cdot 2.4^n > \frac{2}{3} \cdot 2.4^{n+1}, \\ c_{n+1} &= a_n \ge 2.4^n. \end{align*}
It follows from the proved inequalities that
p(n)=an+bn+cn2.4n+232.4n+22.4n1=(2.4+1.6+1)2.4n1=52.4n1. p(n) = a_n + b_n + c_n \ge 2.4^n + \frac{2}{3} \cdot 2.4^n + 2 \cdot 2.4^{n-1} = (2.4+1.6+1) \cdot 2.4^{n-1} = 5 \cdot 2.4^{n-1}.

The latter inequality can be proved analogously; we will verify that for n3n \ge 3,
ank2.5n,bnk232.5n,cnk2.5n1,(2) a_n \le k \cdot 2.5^n, \quad b_n \le k \cdot \frac{2}{3} \cdot 2.5^n, \quad c_n \le k \cdot 2.5^{n-1}, \quad (2)
where kk is a suitably chosen number. Then we will have
p(n)=an+bn+cnk2.5n1(2.5+53+1)=k2.5n1316=5k31302.5n1. p(n) = a_n + b_n + c_n \le k \cdot 2.5^{n-1} \cdot \left(2.5 + \frac{5}{3} + 1\right) = k \cdot 2.5^{n-1} \cdot \frac{31}{6} = 5k \cdot \frac{31}{30} \cdot 2.5^{n-1}.
Therefore, setting k=3031k = \frac{30}{31}, we get p(n)52.5n1p(n) \le 5 \cdot 2.5^{n-1} for every n3n \ge 3.
It remains to prove, by mathematical induction, the inequalities (2) where k=3031k = \frac{30}{31}.
They hold for n=3n = 3. If (2) holds, we also have
an+1=an+bn+2cnk2.5n(1+23+45)=k2.5n3715<k2.5n+1,bn+1=an+bnk2.5n(1+23)=k232.5n+1,cn+1=ank2.5n. \begin{align*} a_{n+1} &= a_n + b_n + 2c_n \le k \cdot 2.5^n \cdot \left(1 + \frac{2}{3} + \frac{4}{5}\right) = k \cdot 2.5^n \cdot \frac{37}{15} < k \cdot 2.5^{n+1}, \\ b_{n+1} &= a_n + b_n \le k \cdot 2.5^n \cdot \left(1 + \frac{2}{3}\right) = k \cdot \frac{2}{3} \cdot 2.5^{n+1}, \\ c_{n+1} &= a_n \le k \cdot 2.5^n. \end{align*}

Solution 2

We will show that each of the sequences {an}\{a_n\}, {bn}\{b_n\}, {cn}\{c_n\} defined in the above solution satisfies (as a consequence of the equalities (1)) the recurrent equation xn+2=2xn+1+2xn2xn1x_{n+2} = 2x_{n+1} + 2x_n - 2x_{n-1}, and so this equation is satisfied by the sequence p(n)=an+bn+cnp(n) = a_n + b_n + c_n in question, which we will denote by (3).
Indeed, the first and third equalities of (1) give an+1=an+bn+2an1a_{n+1} = a_n + b_n + 2a_{n-1}, whence
bn=an+1an2an1,sobn+1=an+2an+12an. b_n = a_{n+1} - a_n - 2a_{n-1}, \quad \text{so} \quad b_{n+1} = a_{n+2} - a_{n+1} - 2a_n.
Considering the second equality in (1), we thus get
an+2an+12an=bn+1=an+bn=an+(an+1an2an1). a_{n+2} - a_{n+1} - 2a_n = b_{n+1} = a_n + b_n = a_n + (a_{n+1} - a_n - 2a_{n-1}).
Confronting the marginal expressions leads to the mentioned equality
an+2=2an+1+2an2an1. a_{n+2} = 2a_{n+1} + 2a_n - 2a_{n-1}.
Triple substitution of an=bn+1bna_n = b_{n+1} - b_n into the equality bn=an+1an2an1b_n = a_{n+1} - a_n - 2a_{n-1} yields
bn=(bn+2bn+1)(bn+1bn)2(bnbn1), b_n = (b_{n+2} - b_{n+1}) - (b_{n+1} - b_n) - 2(b_n - b_{n-1}),
which can be rearranged to
bn+2=2bn+1+2bn2bn1. b_{n+2} = 2b_{n+1} + 2b_n - 2b_{n-1}.
Finally, the sequence {cn}\{c_n\} is merely a shifted sequence {an}\{a_n\}, so
cn+2=an+1=2an+2an12an2=2cn+1+2cn2cn1. c_{n+2} = a_{n+1} = 2a_n + 2a_{n-1} - 2a_{n-2} = 2c_{n+1} + 2c_n - 2c_{n-1}.
Combining all of the three recurrent formulae, we get
p(n+2)=2p(n+1)+2p(n)2p(n1).(3) p(n+2) = 2p(n+1) + 2p(n) - 2p(n-1). \quad (3)

Using mathematical induction, we will prove that for every k1k \ge 1,
2.4p(k)p(k+1)2.5p(k).(4) 2.4p(k) \le p(k+1) \le 2.5p(k). \quad (4)
The inequalities (4) hold for both k=1k = 1 and k=2k = 2. If (4) holds for all k{1,2,,n+1,n+2}k \in \{1, 2, \dots, n+1, n+2\}, then
p(n+3)=2(p(n+2)+p(n+1)p(n))2(p(n+2)+p(n+1)p(n+1)2.4)=2(p(n+2)+7p(n+1)12)2(p(n+2)+712p(n+2)2.5)=74p(n+2)30>2.4p(n+2). \begin{aligned} p(n+3) &= 2(p(n+2) + p(n+1) - p(n)) \ge 2\left(p(n+2) + p(n+1) - \frac{p(n+1)}{2.4}\right) = 2\left(p(n+2) + \frac{7p(n+1)}{12}\right) \ge 2\left(p(n+2) + \frac{7}{12} \cdot \frac{p(n+2)}{2.5}\right) = \frac{74p(n+2)}{30} > 2.4p(n+2). \end{aligned}
Similarly,
p(n+3)2(p(n+2)+p(n+1)p(n+1)2.5)2(p(n+2)+35p(n+2)2.4)=2.5p(n+2). \begin{aligned} p(n+3) &\le 2\left(p(n+2) + p(n+1) - \frac{p(n+1)}{2.5}\right) \le 2\left(p(n+2) + \frac{3}{5} \cdot \frac{p(n+2)}{2.4}\right) = 2.5p(n+2). \end{aligned}
The equalities 52.40=p(1)=52.505 \cdot 2.4^0 = p(1) = 5 \cdot 2.5^0 and the inequalities of (4) imply that the inequality 52.4n1p(n)52.5n15 \cdot 2.4^{n-1} \le p(n) \le 5 \cdot 2.5^{n-1} holds for every positive integer nn.

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