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$ Let $P(x)$ be a polynomial such that,
$$P(x)=a_0+a_1x+a_2 x^2+a_3x^3+.......+a_nx^n,~~(a_i,n\in{Z^{\geq 0}})$$
$$ P(1)=4, P(5)=136$$
We have to find $P(3)$
This problem is harder than it looks (at least for me)
What I tried to do was
$$P(1)=a_0+a_1+a_2+a_3+.......+a_n=4$$ and $$P(5)=a_0+5a_1+25a_2 +125a_3+.......+a_n5^n$$
Let $P(1)=S$, and we take $a_0$ to the side of $S$ and multiply $(S-a_0)$ by $5$ and some cancellations. Simply it leads nowhere
Can I get some Hints on how to proceed?
 A: 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$
A: 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.
A: Okay.... hints.
What is the remained of $136$ divided by $5,25, 125$ and $625$.
What does that say about $P(5) = \sum_{k=0}^n 5^k a_k$ and the values of $a_k$.
And $P(1) = \sum_{k=0}^n 1^k\cdot a_k$.  What does that say about how many non-zero values of $a_k$ there are and what their maximum values can be.
I hope with these hints that you not only can tell what $P(3)$ is, You can express $P(x)$ with absolute certainty.
A: Hint: Given that $P(1)=4$, I'm tempted to write $P(x) = x^{n_1}+x^{n_2}+x^{n_3}+x^{n_4}$ where $n_1,n_2,n_3,n_4$ are not necessarily distinct. Then using the fact $P(5)=136$ should be easier.
