7. Find the sum of all positive integers $p$ such that the expression $(x-p)(x-13)+4$ can be expressed in the form $(x+q)(x+r)$ for distinct integers $q$ and $r$.
7. Answer: 26
Let $(x-p)(x-13)+4=(x+q)(x+r)$. Substituting $x=-q$ into the above identity yields $(-q-p)(-q-13)=-4$, which becomes $(q+p)(q+13)=-4$. Since $p$ and $q$ are integers, we must have the following cases:
(a) $q+p=4, q+13=-1$;
(b) $q+p=-4, q+13=1$;
(c) $q+p=2, q+13=-2$; or
(d) $q+p=-2, q+13=2$

For case (a), we obtain $q=-14, p=8$ and hence $(x-p)(x-13)+4=(x-14)(x-17)$;
For case (b), we obtain $q=-12, p=8$ and hence $(x-p)(x-13)+4=(x-9)(x-12)$;
For case (c), we obtain $q=-15, p=17$ and hence $(x-p)(x-13)+4=(x-15)^{2}$; which is NOT what we want;
For case (d), we obtain $q=-11, p=9$ and hence $(x-p)(x-13)+4=(x-11)^{2}$; which is also NOT what we want. Hence the two possible values of $p$ are 8 and 18 , the sum of which is 26 .