Problem

Source: Moldova TST 2016, day2, problem 1

Tags: number theory



The sequence of polynomials $\left( P_{n}(X)\right)_{n\in Z_{>0}}$ is defined as follows: $P_{1}(X)=2X$ $P_{2}(X)=2(X^2+1)$ $P_{n+2}(X)=2X\cdot P_{n+1}(X)-(X^2-1)P_{n}(X)$, for all positive integers $n$. Find all $n$ for which $X^2+1\mid P_{n}(X)$