Integer root of a quadratic Determine the sum of all (distinct) positive integers $ n$ , such that for some integer $a$, 
$$ n^2 -an + 6a = 0. $$

The equation is equivalent to
$$
a(n-6) = n^2.
$$
So we are looking for all $n$ such that $n-6$ divides $n^2$.
Polynomial long division of $n^2$ by $n-6$ gives $n^2 = (n-6)(n+6) + 36$, so equivalently, $n-6$ divides $36$.
Enumeration of the divisors of $36$ yields
$$
n-6\in\{\pm 1,\pm 2,\pm 3,\pm 4,\pm 6,\pm 9,\pm 12,\pm 18,\pm 36\}.
$$
Since $n$ is required to be positive, the answer is
$$
n\in\{2,3,4,5,7,8,9,10,12,15,18,24,42\}.
$$
