Maths Olympiad Prep

Library / /488 of 520

Combinatorics Difficulty 6.3 National olympiad Prove it

1. [20] Let nn be a positive integer. Define a sequence by a0=1,a2i+1=aia_{0}=1, a_{2 i+1}=a_{i}, and a2i+2=ai+ai+1a_{2 i+2}=a_{i}+a_{i+1} for each i0i \geq 0. Determine, with proof, the value of a0+a1+a2++a2n1a_{0}+a_{1}+a_{2}+\cdots+a_{2^{n}-1}.

Solution

Answer: 3n+12\frac{3^{n}+1}{2}
Solution 1: Note that a2n1=1a_{2^{n}-1}=1 for all nn by repeatedly applying a2i+1=aia_{2 i+1}=a_{i}. Now let bn=b_{n}= a0+a1+a2++a2n1a_{0}+a_{1}+a_{2}+\cdots+a_{2^{n}-1}. Applying the given recursion to every term of bnb_{n} except a0a_{0} gives
bn=a0+a1+a2+a3++a2n1=a0+a2+a4++a2n2+a1+a3++a2n1=a0+(a0+a1)+(a1+a2)+(a2+a3)++(a2n12+a2n11)+a0+a1+a2++a2n11=3a0+3a1+3a2++3a2n12+3a2n11a2n11=3bn11. \begin{aligned} b_{n}= & a_{0}+a_{1}+a_{2}+a_{3}+\cdots+a_{2^{n}-1} \\ = & a_{0}+a_{2}+a_{4}+\cdots+a_{2^{n}-2}+a_{1}+a_{3}+\cdots+a_{2^{n}-1} \\ = & a_{0}+\left(a_{0}+a_{1}\right)+\left(a_{1}+a_{2}\right)+\left(a_{2}+a_{3}\right)+\cdots+\left(a_{2^{n-1}-2}+a_{2^{n-1}-1}\right) \\ & +a_{0}+a_{1}+a_{2}+\cdots+a_{2^{n-1}-1} \\ = & 3 a_{0}+3 a_{1}+3 a_{2}+\cdots+3 a_{2^{n-1}-2}+3 a_{2^{n-1}-1}-a_{2^{n-1}-1} \\ = & 3 b_{n-1}-1 . \end{aligned}

Now we easily obtain bn=3n+12b_{n}=\frac{3^{n}+1}{2} by induction.
Solution 2: Define a binary string to be good if it is the null string or of the form 10101010101010 \ldots 10. Let cnc_{n} be the number of good subsequences of nn when written in binary form. We see c0=1c_{0}=1 and c2n+1=cnc_{2 n+1}=c_{n} because the trailing 1 in 2n+12 n+1 cannot be part of a good subsequence. Furthermore, c2n+2cn+1c_{2 n+2}-c_{n+1} equals the number of good subsequences of 2n+22 n+2 that use the trailing 0 in 2n+22 n+2. We will show that this number is exactly cnc_{n}.
Let ss be a good subsequence of 2n+22 n+2 that contains the trailing 0 . If ss uses the last 1 , remove both the last 1 and the trailing 0 from ss; the result ss^{\prime} will be a good subsequence of nn. If ss does not use the last 1 , consider the sequence ss^{\prime} where the trailing 0 in 2n+22 n+2 is replaced by the last 0 in nn (which is at the same position as the last 1 in 2n+22 n+2.) The map sss \mapsto s^{\prime} can be seen to be a bijection, and thus c2n+2=cn+cn+1c_{2 n+2}=c_{n}+c_{n+1}.
Now it is clear that an=cna_{n}=c_{n} for all nn. Consider choosing each binary string between 0 and 2n12^{n}-1 with equal probability. The probability that a given subsequence of length 2k2 k is good is 122k\frac{1}{2^{2 k}}. There are (n2k)\binom{n}{2 k} subsequences of length 2k2 k, so by linearity of expectation, the total expected number of good subsequences is
k=0n/2(n2k)22k=(1+1/2)n+(11/2)n2=3n+12n+1. \sum_{k=0}^{\lfloor n / 2\rfloor} \frac{\binom{n}{2 k}}{2^{2 k}}=\frac{(1+1 / 2)^{n}+(1-1 / 2)^{n}}{2}=\frac{3^{n}+1}{2^{n+1}} .

This is equal to the average of a0,,a2n1a_{0}, \ldots, a_{2^{n}-1}, therefore the sum a0++a2n1a_{0}+\cdots+a_{2^{n}-1} is 3n+12\frac{3^{n}+1}{2}.

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.