Let $P(x)$ be a polynomial of degree 3 such that $P(1)=4 , P(2)=17$ and $P(9)=892$.
Find the value of $P(40)$.