Problem

Source: TSTST 2024, problem 2

Tags: algebra, polynomial, continued fraction, USA TSTST, Tstst



Let $p$ be an odd prime number. Suppose $P$ and $Q$ are polynomials with integer coefficients such that $P(0)=Q(0)=1$, there is no nonconstant polynomial dividing both $P$ and $Q$, and \[ 1 + \cfrac{x}{1 + \cfrac{2x}{1 + \cfrac{\ddots}{1 + (p-1)x}}}=\frac{P(x)}{Q(x)}. \]Show that all coefficients of $P$ except for the constant coefficient are divisible by $p$, and all coefficients of $Q$ are not divisible by $p$. Andrew Gu