Let $n \geq 5$ be an integer. Find the largest integer $k$ (as a function of $n$) such that there exists a convex $n$-gon $A_{1} A_{2} \ldots A_{n}$ for which exactly $k$ of the quadrilaterals $A_{i} A_{i+1} A_{i+2} A_{i+3}$ have an inscribed circle, where indices are taken modulo $n$.
The main claim is the following: Claim - We can't have both $A_{1} A_{2} A_{3} A_{4}$ and $A_{2} A_{3} A_{4} A_{5}$ be circumscribed.  ![](https://cdn.mathpix.com/cropped/2024_11_19_4d9e3ecba99734fe13c2g-8.jpg?height=621&width=892&top_left_y=1049&top_left_x=585)  Then $A_{1} A_{4}=c+a-b$ and $A_{5} A_{2}=b+d-c$. But now  
$$ A_{1} A_{4}+A_{2} A_{5}=(c+a-b)+(b+d-c)=a+d=A_{1} A_{2}+A_{4} A_{5} $$  
but in the picture we have an obvious violation of the triangle inequality. This immediately gives an upper bound of $\lfloor n / 2\rfloor$. For the construction, one can construct a suitable cyclic $n$-gon by using a continuity argument (details to be added).