Quadratic equation has integral roots 
Find all positive numbers $p$ for which the equation $x^2+px+3p = 0$ has integral roots.

We have by the quadratic formula $$x = \dfrac{-p \pm \sqrt{p^2-12p}}{2}.$$ Thus, $p^2-12p = p(p-12)$ must be a perfect square. How do we continue?

Let $a,b$ be the integer roots. Then by Vieta's formulas:
$$
\begin{align}
a + b = -p \tag{1} \\
ab = 3p \tag{2}
\end{align}
$$
By $(2)$ the roots must have the same sign, and by $(1)$ they must be both negative. If $p=0$ then the trivial solution is $a=b=0\,$, otherwise dividing $(1) / (2)\,$:
$$
\frac{1}{a}+\frac{1}{b} = -\frac{1}{3} \quad \iff \quad \frac{1}{(-a)}+\frac{1}{(-b)} = \frac{1}{3}
$$
The above gives another trivial solution $a=b=-6 \iff p=12\,$, otherwise it reduces to the problem of expressing the unit fraction $\cfrac{1}{3}$ as the sum of two distinct unit fractions $\cfrac{1}{(-a)}+\cfrac{1}{(-b)}$. The latter is (related to egyptian fractions, and is) known to have a unique solution since $3$ is a prime (see this for example), which is $a=-4,b=-12$ in this case, giving $p=16$.
Summing up the subcases listed above, $p \in \{0, 12, 16\}\,$.
