Diophantine equation : two products of linear factors differ by a constant Recently, I was asked the following question by a friend : find 
all $a,b,c,a',b',c',k \in {\mathbb Z}$ with $k\neq 0$ such that the identity
$$
(X-a)(X-b)(X-c)+k=(X-a')(X-b')(X-c')
$$
holds in ${\mathbb Z}[X]$. Does anyone have an idea ? 
Note that there is a certain translation invariance for the solutions :
$(a,b,c,a',b',c',k)$ is a solution iff $(a+m,b+m,c+m,a'+m,b'+m,c'+m,k)$ is,
for any $m\in{\mathbb Z}$.
 A: These are not all solutions, but one infinite family.
For example, for any integers $x,y,z$, take $a = xyz$, $b = -x(x+y)z$, $c = -y(x+y)z$, $k = x^2 y^2 (x+y)^2 z^3$.  Note that $ab + ac + bc = 0$.  If $p(X) = (X-a)(X-b)(X-c)$, we have
$p(0) = -x^2 y^2 (x+y)^2 z^3$ and $p'(0) = 0$, and then
$$p(X) + k = X^2 (X + (x^2 + xy + y^2) z )$$
EDIT: The same value of $(x^2 + x y + y^2) z$ can occur for different $x,y,z$, so 
this produces different solutions with $a,b,c$ distinct.  For example,
try $x,y,z = -3,8,1$ and $x', y', z' = -3,1,7$: we get 
$$ (X+24)(X-15)(X+40) = (X+21)(X+42)(X-14)-2052$$
EDIT: Let $q(a,b,c) = (X-a)(X-b)(X-c)$, so you want to solve $q(a,b,c) +k = q(a',b',c')$.  Note that this is true for some $k$ iff
$\dfrac{d}{dX} q(a,b,c) = \dfrac{d}{dX} q(a',b',c')$, and that is equivalent to
$$ \eqalign{a + b + c &= a' + b' + c'\cr
ab + ac + bc &= a'b' + a'c' + b'c'\cr}$$
Now given two integers $u,v$, we may try to solve
$$ \eqalign{a + b + c &= u\cr
ab + ac + bc &= v\cr}$$
Eliminating $c$ gives us
$$ 3 (2a + b - u)^2 +  (3 b - u)^2 = {4} u^2 - 12 v $$
Given $u$ and $v$, the equation $3 y^2 + z^2 = 4 u^2 - 12 v$ has finitely many integer solutions $(y,z)$.  We want solutions where $z \equiv -u \mod 3$
(so  $b = (z+u)/3$ is an integer), and where $y \equiv u - b \mod 2$ (so 
$a = (y+u-b)/2$ is an integer).
For example, with $u=79$ and $v = 1920$ there are $24$ integer solutions of $3 y^2 + z^2 = 1924$. Of these, $12$ satisfy $z \equiv - u \mod 3$, and all these
satisfy $y \equiv u - b \mod 2$.  The corresponding $(a,b,c)$ values are the six permutations of $(15,24,40)$ and the six permutations of $(12,31,36)$.
Thus these correspond to 
$$ (X - 15)(X - 24)(X - 40) + k = (X - 12)(X - 31)(X - 36)$$
where in this case $k = 15\cdot 24 \cdot 40 - 12 \cdot 31 \cdot 36 = 1008$.
The next step would be to look at this in terms of factorization in $\mathbb Z[\sqrt{-3}]$.
