Solution (source code)

= Solution

For $n=1,2,3$, the difference quotient at zero is $x^{n-1}\sin(1/x)$. It oscillates without a limit for $n=1$, while the <squeeze theorem> gives limit zero for $n=2,3$. The other two cases fail <continuity> and therefore cannot be differentiable. Hence
$$
\boxed{n=2,3,\qquad q_x(0,n)=0.}
$$