Maths Olympiad Prep

Library / /15 of 17

, 2021

Algebra Difficulty 5.7 AIME, harder Prove it United States

Problem:

Jude repeatedly flips a coin. If he has already flipped nn heads, the coin lands heads with probability 1n+2\frac{1}{n+2} and tails with probability n+1n+2\frac{n+1}{n+2}. If Jude continues flipping forever, let pp be the probability that he flips 3 heads in a row at some point. Compute 180p\lfloor 180 p\rfloor.

Solution

Solution:

Let pnp_{n} be the probability that the nnth\text{th} head is flipped after a tail and Jude has yet to flip 3 heads consecutively to this point. For example, p2=23p_{2}=\frac{2}{3}, as it is impossible for 3 heads to be flipped consecutively and the second head comes after a tail exactly when the first flip after the first head is a tail, which happens with probability 23\frac{2}{3}. Similarly, p3=34p_{3}=\frac{3}{4}. We now establish a recursion between values of pnp_{n}:
pn=nn+1pn1+1n+1pn2. p_{n}=\frac{n}{n+1} p_{n-1}+\frac{1}{n+1} p_{n-2}.
The first term comes from when the previous head had tails both before and after, and the second term comes from when the previous 2 heads were consecutive. Of course there cannot be other terms, as this would imply that 3 heads were flipped consecutively. This enables us to easily compute the next few terms: 1115\frac{11}{15}, 5372\frac{53}{72}, 103140\frac{103}{140}, and so on. Notably, the differences between consecutive terms (starting from p3p2p_{3}-p_{2}) are 224,2120,2720,25040\frac{2}{24},-\frac{2}{120}, \frac{2}{720},-\frac{2}{5040}, and so on. This leads us to guess that pn=2i=0n+1(1)ii!p_{n}=2 \sum_{i=0}^{n+1} \frac{(-1)^{i}}{i!}, which indeed satisfies the given recurrence relation. Then
limnpn=2i=0(1)ii!=2e \lim _{n \rightarrow \infty} p_{n}=2 \sum_{i=0}^{\infty} \frac{(-1)^{i}}{i!}=\frac{2}{e}
But since the probability that the nnth\text{th} head comes after a tail approaches 1 as nn increases, this limit is the same as the limit of the probability that the first nn heads do not include 3 that came consecutively. Then this limit is just the probability that we never flip 3 consecutive heads. Then the desired probability is just p=12ep=1-\frac{2}{e}. We are asked to compute 180p\lfloor 180 p\rfloor. This is the floor of 180360e180-\frac{360}{e}. To compute 360/e360 / e, note that we can just truncate the infinite sum
360e=n=0360(1)nn! \frac{360}{e}=\sum_{n=0}^{\infty} \frac{360(-1)^{n}}{n!}
as it converges rather quickly. The first several terms are 360360+18060+153+12360-360+180-60+15-3+\frac{1}{2}, and the rest are insignificant. This sums to about 132.5, giving an answer of 180132.5=47\lfloor 180-132.5\rfloor=47.

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.