If $P$ is a polynomial with $P(3)=10$ and $P(1)=1$, then why can't all the coefficients of $P$ be integers?

If the coefficients of $P$ are all integers, then $P(odd)=odd$ (that is, the value of $P$ at an odd integer is odd) if and only if an odd number of coefficients are odd. So if $P(1)=1$, there must be an odd number of odd coefficients, but if $P(3)=10$ there must be an even number of odd coefficients. This is a contradiction, so the coefficients cannot all be integers.


If $p(x)$ is a polynomial with integer coeficients then for all integers $a,b$ you have $$a-b\mid p(a)-p(b)$$

In particular you have $$3-1\mid p(3)-p(1) = 9$$

A contradiction.


Suppose all coefficients of $P$ are integers. Then $Q(x) := P(x+1)-1$ is also a polynomial with integer coefficients (just expand and simplify). We have $$Q(0) = P(1)-1 = 0,$$ which means the zero-th degree coefficient of $Q$ is $0$, so $Q(x)/x$ is also a polynomial with integer coefficients. In particular this implies that $Q(2)/2$ must be an integer. But $$\frac{Q(2)}{2} = \frac{P(3)-1}{2} = \frac{10-1}{2} = \frac{9}{2}.$$ Contradiction.