2016 AIME II Problems/Problem 5

Triangle $ABC_0$ has a right angle at $C_0$. Its side lengths are pariwise relatively prime positive integers, and its perimeter is $p$. Let $C_1$ be the foot of the altitude to $\overline{AB}$, and for $n \geq 2$, let $C_n$ be the foot of the altitude to $\overline{C_{n-2}B}$ in $\triangle C_{n-2}C_{n-1}B$. The sum $\sum_{i=1}^\infty C_{n-2}C_{n-1} = 6p$. Find $p$.

Solution

Note that by counting the area in 2 ways, the first altitude is $\dfrac{ac}{b}$. By similar triangles, the common ratio is $\dfrac{a}{c}$ for reach height, so by the geometric series formula, we have $6p=\dfrac{\dfrac{ac}{b}}{1-\dfrac{a}{c}}$. Testing triangles of the form $2p+1, 2p^{2}+2p, 2p^{2}+2p+1$, we have $13, 84, 85$ satisfy this equation, so $p=13+84+85=\boxed{182}$.