# Is this proof wrong?

For $n>1$, let $a_1, a_2, \dots, a_n$ be $n$ distinct integers. Prove that the polynomial $$f(x)=(x-a_1)(x-a_2)...(x-a_n) - 1$$ cannot be written as the product of two nonconstant polynomials with integer coefficients.

My Proof (or attempt)

Assume that $f(x)$ can be written as $h(x)\cdot g(x)$. Note for any $x$, $f(x)$ must be prime. This means either $h(x)$ or $g(x)$ must equal $1$, but since these polynomials must be non-constant, we have a contradiction, and we are done.

Source: Art of Problem Solving Vol. 2

-
In short, "yes". What leads you to conclude that f(x) must be prime for any x? (surely you mean any integer x, but even that isn't possible). – NKS Dec 31 '11 at 18:30
To expand on the above comment, was the OP's intuition that if you take a product of "many" integers, then subtract 1, you get a prime? This is false. – idmercer Dec 31 '11 at 22:58
This would just give us a fantastic generator for prime numbers ! :D – user20010 Dec 31 '11 at 23:18
So yes, you proof is wrong. – user20010 Dec 31 '11 at 23:24
@idmercer Haha yes, it was. I don't know why I believed so, but it just felt "right" but Ismail brings up a nice point ;) – MathMathCookie Jan 1 '12 at 16:59

Suppose $f=gh$. Then $-1=f(a_i)=g(a_i)h(a_i)$. Since $g(a_i)$ and $h(a_i)$ are integers, we have $g(a_i)=-h(a_i)$ for all $i$. If both $g$ and $h$ have degree less than $n$, this implies that $g=-h$. But then $f=-g^2$, which cannot happen because the leading coefficients cannot match.