# Prove that there is no non-constant polynomial $p(n)$ with integer coefficients that only takes prime values [duplicate]

Attempt (so far):

Assume there exists a non-constant polynomial $p: \mathbb Z \to \mathbb Z$ with integer coeffecients that only takes on prime values. Let notate it as

$$p(n)=d_j n^j + d_{j-1} n^{j-1}+ \dots +d_1 n + d_0$$

where $j\in \mathbb N$.

Let $k$ be some composite number with $r$-many factors. Then $$\begin{array} \ k &=& p(n_1)^{i_1} p(n_2)^{i_2} \dots p(n_r)^{i_r} \\ &=& (d_j {n_1}^j + d_{j-1} {n_1}^{j-1}+ \dots +d_1 {n_1}+d_0)^{i_1} \dots (d_j {n_r}^j + d_{j-1} {n_r}^{j-1}+ \dots +d_1 {n_r}+d_0)^{i_r} \end{array}$$

I don't really see how to progress from here unless I want to start doing ungodly amounts of computation. Could someone provide a hint of a path I should be taking?

## marked as duplicate by Bill Dubuque prime-numbers StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Sep 4 '17 at 20:16

• Hint: if there is a prime $q$ that divides $d_0$ then $q\,|\,p(nq)$ for all $n$. So you are done unless $d_0=\pm 1$. To handle that case, consider $p(x+M)$ for big $M$. – lulu Sep 4 '17 at 12:25
• Ahh okay, I understand the case for $d_0\neq \pm1$! Thank you. I tried looking at the other case but I don't see how having a big $M$ would help. I tried playing around with $$p(n) = d_j (x+M)^j + d_{j-1} (x+M)^{j-1}+ \dots +d_1 (x+M) \pm 1$$ and $$x + M \equiv x \mod M \implies p(x)=p(x+M)+kM \implies 2|kM$$ but alas both seem thus far like dead ends.. – Andrew Tawfeek Sep 4 '17 at 12:54
• Well, if $p(x)$ has constant term $\pm 1$ then $f(x)=p(x+M)$ probably won't. I mean, there are only finitely many $M$ for which $p(x+M)$ has constant term $\pm 1$ so just take $M$ bigger than that finite list. But then the first argument applies to $f(x)$. – lulu Sep 4 '17 at 12:57
• Ahhhhhhh alright -- I noticed with $p(x+M)$ we'd get our constant term back but it slipped my mind to take the same approach used for $p(n)$. Perhaps I'll do more of these on my own time to get more used to them. Thank you for the problem and the help :) – Andrew Tawfeek Sep 4 '17 at 13:01

Given $p(n)=d_j n^j + d_{j-1} n^{j-1}+ \dots +d_1 n + d_0$ note that $p(0) = d_0$ is prime. So then perhaps $d_0$ would be a prime dividing $p(d_0)$, which is also prime. When can one prime divide another? Also note that this happens for any $p(kd_0), k \in \mathbb Z$. How many times can a non-constant polynomial revisit the same value?
• You make a good point. If "only takes prime values" is interpreted as including $p(0)$ then the constant term has to itself be a prime (hence not $\pm 1$). I think, in practice though, one often means "takes prime values for $n=\{1,2,3,\cdots\}$. That case is still impossible, but now you have to deal with the possibility that the constant term is $\pm 1$. – lulu Sep 4 '17 at 13:00
• Fair enough, I had assumed that as the polynomial was defined on $\mathbb Z$ we would consider all integer arguments, but I suppose with that extra criterion we would have to deal with the extra case. Your comment above seems like a rather slick way of dealing with it. Kudos. – Tim The Enchanter Sep 4 '17 at 13:03
• @lulu It's in the absurd hypothesis that $p(n)$ takes prime values for all $n\in\mathbb{Z}$ therefore $p(0)=d_0$ is prime for the (absurd) hypothesis and cannot be $\pm 1$ – Raffaele Sep 4 '17 at 13:05
• @Raffaele Sure, as the problem is stated we must have $p(0)$ prime. I am just pointing out that the claim is still true if you restrict to $n≥1$ or indeed to "all integers $n$ above some threshold". Not much harder to demonstrate. – lulu Sep 4 '17 at 13:07