2023 IMO Problems/Problem 5

Problem

Let $n$ be a positive integer. A Japanese triangle consists of $1 + 2 + \dots + n$ circles arranged in an equilateral triangular shape such that for each $i = 1$, $2$, $\dots$, $n$, the $i^{th}$ row contains exactly $i$ circles, exactly one of which is coloured red. A ninja path in a Japanese triangle is a sequence of $n$ circles obtained by starting in the top row, then repeatedly going from a circle to one of the two circles immediately below it and finishing in the bottom row. Here is an example of a Japanese triangle with $n = 6$, along with a ninja path in that triangle containing two red circles.

[asy] unitsize(7mm); path q=(3,-3sqrt(3))--(-3,-3sqrt(3)); filldraw(shift(0*dir(240)+0*dir(0))*scale(0.5)*unitcircle,lightred); filldraw(shift(1*dir(240)+0*dir(0))*scale(0.5)*unitcircle,lightred); draw(shift(1*dir(240)+1*dir(0))*scale(0.5)*unitcircle); draw(shift(2*dir(240)+0*dir(0))*scale(0.5)*unitcircle); draw(shift(2*dir(240)+1*dir(0))*scale(0.5)*unitcircle); filldraw(shift(2*dir(240)+2*dir(0))*scale(0.5)*unitcircle,lightred); draw(shift(3*dir(240)+0*dir(0))*scale(0.5)*unitcircle); draw(shift(3*dir(240)+1*dir(0))*scale(0.5)*unitcircle); filldraw(shift(3*dir(240)+2*dir(0))*scale(0.5)*unitcircle,lightred); draw(shift(3*dir(240)+3*dir(0))*scale(0.5)*unitcircle); draw(shift(4*dir(240)+0*dir(0))*scale(0.5)*unitcircle); draw(shift(4*dir(240)+1*dir(0))*scale(0.5)*unitcircle); draw(shift(4*dir(240)+2*dir(0))*scale(0.5)*unitcircle); filldraw(shift(4*dir(240)+3*dir(0))*scale(0.5)*unitcircle,lightred); draw(shift(4*dir(240)+4*dir(0))*scale(0.5)*unitcircle); filldraw(shift(5*dir(240)+0*dir(0))*scale(0.5)*unitcircle,lightred); draw(shift(5*dir(240)+1*dir(0))*scale(0.5)*unitcircle); draw(shift(5*dir(240)+2*dir(0))*scale(0.5)*unitcircle); draw(shift(5*dir(240)+3*dir(0))*scale(0.5)*unitcircle); draw(shift(5*dir(240)+4*dir(0))*scale(0.5)*unitcircle); draw(shift(5*dir(240)+5*dir(0))*scale(0.5)*unitcircle); draw((0,0)--(1/2,-sqrt(3)/2)--(0,-sqrt(3))--(1/2,-3sqrt(3)/2)--(0,-2sqrt(3))--(-1/2, -5sqrt(3)/2),linewidth(1.5)); draw(q,Arrows(TeXHead, 1)); label("$n = 6$", q, S); [/asy]

Solution

https://www.youtube.com/watch?v=jZNIpapyGJQ [Video contains solutions to all day 2 problems]