Integer root of a quadratic

112 Views Asked by At

Determine the sum of all (distinct) positive integers $ n$ , such that for some integer $a$,

$$ n^2 -an + 6a = 0. $$

2

There are 2 best solutions below

1
On

Solve for $a$: $a=\frac{n^2}{n-6}=n+\frac{36}{n-6}+6$ which is an integer when $n-6$ divides $36$, i.e. $\{2, 3, 4, 5, 7, 8, 9, 10, 12, 15, 18, 24, 42\}$, whose sum is 159.

0
On

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\}. $$