Call an univariate polynomial $f(x) = \sum\_{i=0}^{n}a\_{i}x^{i} \in \Bbb{Z}[x]$ symmetric if $a\_{i} = a\_{n-i}$ and $a\_{0} = a\_{n} > 0$. 


For a given $\sum\_{i=0}^{n}a\_{i}$ and $a\_{i} \geq 0$, how many symmetric polynomials $f(x) = \sum\_{i=0}^{n}a\_{i}x^{i} $ over $\Bbb{Z}[x]$ are there such that for two fixed integers $r,s$ $f(r)=s$? (two cases: first case - the degree $n$ is same for both the polynomials and second case - the degree $n$ may be different for both the polynomials)


Are there more than one such polynomials (if one exists)?


How does one construct any such polynomial?



Counting polynomials with same coefficient sum and a given value at a point
The polynomials $f\_1=x^4+9x^3+9x+1$ and $f\_2=3x^4+14x^2+3$ both have coefficient sum $f\_1(1)=f\_2(1)=20$ and the common value $f\_1(2)=f\_2(2)=107.$ The key is that the difference $f2-f1=g=2x^4-9x^3+14x^2-9x+2$ is symmetric with $g(1)=g(2)=0.$ we could take $f\_2=f\_1+g$ for any symmetric degree $4$ polynomial with large enough positive coefficients. We can also multiply both $f\_1$ and $f\_2$ by any symmetric integer polynomial.


In general
If $f\_1(x)$ and $f\_2(x)$ have 


* equal degree
* equal value $f\_1(r)=f\_2(r)=s$ and
* equal coefficient sum $f\_1(1)=f\_2(1)$
* positive coefficients


then the difference $g(x)=f\_2(x)-f\_1(x)$ will have $g(r)=g(1)=0$. Once we have a suitable $g(x)$ we can build many eamples $f\_1,f\_2$


So 


* start with a symmetric polynomial having a root $r \ne 0$ say $rx^2-(r^2+1)x+r$
* multiply that by $x^2-2x+1$ to get a symmetric polynomial, in this case $g(x)=r{x}^{4}- \left( {r}^{2}+2\,r+1 \right) {x}^{3}+ \left( 2\,{r}^{2}+2 \,r+2 \right) {x}^{2}- \left( {r}^{2}+2\,r+1 \right) x+r,$ 
where $g(r)=0$ and also $g(1)=0$ (i.e. the coeffixcients add to $0$).
* Now pick another symmetric polynomial $f\_1(x)$ of the same degree with positive coefficients and set $s=f\_1(r)$.


Then $f\_1$ and $f\_2=f\_1+g$ will have the first three properties above and will have the fourth property provided the coefficients of $f\_1$ are large enough. 


If you relax the conditions slightly, then the $g$ above gives $f\_1=9x^3+9x$ and $f\_2=2x^4+14x^2+2$ with unequal degrees, coefficient sum $18$, and $f\_1(2)=f\_2(2)=90.$ 


This does not give an example with unequal degrees yet both with non-zero constant term.




---


This seems like cheating, but would you consider the polynomials $f\_1=x^2+2x+1$ and $f\_2=4$ an example with $f(-3)=4$ in both cases? In general $r=-b-1$ and $s=b+2$ for $f\_1=x^2+bx+1$ and $f\_2=b+2$


It looks less trivial if we, as mentioned above, multiply both sides by $x+1$ or some other symmetric polynomial to get things like $f\_1=x^3+3x^2+3x+1$ and $f\_2=4x+4$ both with $f(-3)=-8.$


