Proof of the infinitude of primes by contradiction using polynomials [duplicate]

A well-known old problem is to ﬁnd a polynomial function, $f(x)$, such that, for each positive integer $n = 1,2,3,...,$ the result $f(n)$ is prime. Notice that if such a function exists, then one would have an alternate proof of the inﬁnitude of primes, since there must be inﬁnitely diﬀerent outputs among the numbers $f(1),f(2),f(3),....$ (a) Prove the last statement. That is, assume that an nth degree polynomial only generated ﬁnitely many diﬀerent values among $f(1),f(2),f(3)$,... and derive a contradiction.

My attempt:

Assume a finite number of primes. Then we say that there are $n$ primes, and we can list them in order: let $2=p_1<p_2<p_n$ be all primes. Now we define an integer $N=1+p_1*p_2*....*p_2$. Since $N>p_n$ and $p_n$ is the larget prime, $N$ is not prime. However, by the fundamental theorem of arithmetic (using the lemma $N>1)N$ must have a prime factor. This means of the primes in our list must divide $N$, In other words there exist an integer $i$ with $1\le i \le n$ such that $p_i$ divides $N$. Since $p_i$ divides both $N$ and the products of all the primes; it must also divide $N-p_1*p_2*...*p_n=1$. Since $p_i\ge 2$ it is impossible that $p_i$ divides one. Hence, a contradiction.

I wrote this up and presented it to my professor he stated that it does not address the point of polynomial functions. I don't think i am seeing this question correctly. Can anyone assist in the proof to address the problem.

marked as duplicate by Bill Dubuque elementary-number-theory 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(); } ); }); }); Aug 4 '17 at 2:18

This question was marked as an exact duplicate of an existing question.

• not all primes are necessarily on the polynomial just infinitely many. also you disprove the whole thing if you allow a constant term because by polynomial remainder theorem you can show that f(c) has the same remainder as f(0)=c when dividing by c. so not all terms can be prime ( unless all terms are constant or all terms that would normally divide by f(n) are f(n)). – user451844 Aug 4 '17 at 1:56
• $f(x) = 2$ is a polynomial for which $f(n)$ is prime, but outputs only finitely many primes (only one!). – mephistolotl Aug 4 '17 at 2:09
• Nowhere in your proof do you mention a polynomial. You do prove that there are infinitely many primes, but you don't do it with polynomials. – mephistolotl Aug 4 '17 at 2:11
• See also this answer. – Bill Dubuque Aug 4 '17 at 2:27