Let $P(x)=a_0+a_1x+a_2 x^2+a_3x^3+.......+a_nx^n$ and $P(1)=4$ and $P(5)=136$
The crucial observation comes from the fact the coefficients need to be in $\mathbb{Z}^{\geq 0}$.
$P(5) = 136$ can only be written in the following ways using powers of 5:
- $1 + (27)(5)$
- $1 + (22-5i)(5) + (i+1)(5^2)$ for $i = 0,1,2,3,4$
- $1 + (2)(5) + (1)(5^3)$
The only one that satisfies $P(1) = 4$ is the last one which is $P(x) = 1 + 2x + x^3$.
Therefore, $P(3) = 34$
Clearly $n\le 3$ as $a_n5^n>136$ for $n\ge 4$ and $a_n\ge 1$. Since $P(5)=136$ this forces $a_3\le 1$. If $a_3=1$, clearly $a_2=0$ which forces $a_1=2$ and $a_0=1$. If $n=2$, as $a_0+a_1+a_2=4$, it is easy to check if all the $a_i$ are less than or equal to $4$, $P(5)=136$ is not achievable.