Find the number of ordered pairs of integers (p,q) satisfying the equation $p^2-q^2+p+q=2014$.
Problem
Source:
Tags:
Dr Sonnhard Graubner
03.06.2014 19:23
hello, here you can find all solutions $(p=-1008\land q=-1006)\lor (p=-1008\land q=1007)\lor (p=-505\land q=-502)\lor (p=-505\land q=503)\lor (p=-63\land q=-43)\lor (p=-63\land q=44)\lor (p=-46\land q=-7)\lor (p=-46\land q=8)\lor (p=45\land q=-7)\lor (p=45\land q=8)\lor (p=62\land q=-43)\lor (p=62\land q=44)\lor (p=504\land q=-502)\lor (p=504\land q=503)\lor (p=1007\land q=-1006)\lor (p=1007\land q=1007)$ Sonnhard.
Dukejukem
04.06.2014 03:16
Factoring, we have $(p + q)(p - q + 1) = 2014 = 2 \cdot 19 \cdot 53$ (This factorization can be found by multiplying the equation by four, in order to write $4p^2 + 4p$ as $(2p + 1)^2$ and likewise with the $q$ terms, which gives us a difference of squares).
If we let $p + q = t$, for some integer $t$, we can rewrite as $t(t - 2q + 1) = 2 \cdot 19 \cdot 53$. Now, it is clear that the two terms will be of different parity, that is, one will be even, and the other odd. In addition, given two even and odd integers, it is easy to set $t$ equal to one of them, and find $q$ to make $t - 2q + 1$ equal to the other. Therefore all combinations of an even integer and an odd integer will work. By checking the four distinct combinations of two positive integers that multiply to $2014$, we can easily see that one will be even, and the other odd. We now multiply by two twice. Firstly, because for each combination of two integers, each can be assigned to either $t$ or $t - 2q + 1$. Secondly, because these factors can be both positive or both negative. Hence our solution is $4 \cdot 2 \cdot 2 = 16$.