Does there exist any polynomial $p(x) \in \mathbb{R}[x]$ such that $p(n)$ is a prime number if and only if $n$ is a palindrome number ?
($n$ must be a positive palindrome number to give $p(n)$ a prime number).



Existence of polynomial p with real coefficients such that p(n) is prime if and only if n is palindrome
There is no such non-constant polynomial, even if we only assume that $p(10^m+1)$ is prime for $m=0,1,\dots$. Using this weaker condition for $m=0,1,\dots,\deg p$, we infer that $p(x)$ has rational coefficients. Let $N$ be a common denominator of the coefficients, and write it as $N=2^r5^sM$ with $(M,10)=1$. Fix $k\geq\max(r,s)$ such that the prime $K:=p(10^k+1)$ exceeds $10$. Now let $\ell\geq k$ be arbitrary with $\phi(MK)\mid\ell-k$. Then $NK\mid 10^kMK\mid 10^\ell-10^k$, hence $K\mid p(10^\ell+1)-p(10^k+1)$. In other words, $K\mid p(10^\ell+1)$, i.e., $K=p(10^\ell+1)$. So $p(10^\ell+1)$ equals $K$ for infinitely many integers $\ell\geq 0$, contradiction.


