Bledimat94 wrote:
let n be a positive integer find the number of all polynomials with integer coefficient from the set{0,1,2,3} and for which P(2)=n
Let $K=\{0,1\}[X]$ the set of polynomials whose coefficients are in $\{0,1\}$
Let $L=\{0,1,2,3\}[X]$ the set of polynomials whose coefficients are in $\{0,1,2,3\}$
Let $P(x)\in L$
Let $P(x)=A_0(x)+A_1(x)+2A_2(x)+3A_3(x)$ where $A_i(x)\in K$ is the polynomial made of sum of powers of $x$ whose coefficient is $i$.
Let then $U(x)=A_0(x)+A_1(x)+A_3(x)$ and $V(x)=A_2(x)+A_3(x)$ so that $P(x)=U(x)+2V(x)$ with $U,V\in K$
The application $f$ from $K\to\mathbb N\cup\{0\}$ such that $f(P)=P(2)$ is a bijection.
So the question is to count the number of couples $(a,b)$ where $a,b\in\mathbb N\cup\{0\}$ such that $a+2b=n$
And this number obviously is $\boxed{1+\left\lfloor\frac n2\right\rfloor}$