Problem 3.
For each integer $k\geqslant 2,$ determine all infinite sequences of positive integers $a_1,a_2,\dots$ for which there exists a polynomial $P$ of the form $P(x)=x^k+c_{k-1}x^{k-1}+\cdots c_1 x+c_0,$ where $c_0,c_1,\dots,c_{k-1}$ are non-negative integers, such that
$$P(a_n)=a_{n+1}a_{n+2}\cdots a_{n+k}$$
for every integer $n\geqslant 1.$

proposed by Ivan Chan, Malaysia