A triline is a line with the property that three times its slope is equal to the sum of its $x$-intercept and its $y$-intercept. For how many integers $q$ with $1 \leq q \leq 10000$ is there at least one positive integer $p$ so that there is exactly one triline through $(p, q)$ ?
(A) 60
(B) 57
(C) 58
(D) 61
(E) 59

N.B. This problem has been corrected from its original version with the addition of the underlined word "positive".
Unfortunately, there was a problem with this question that we did not discover until after the Contests had been written. Our thanks go to Dr. Yongmoo Kim for pointing this out.

If the problem had been posed as

A triline is a line with the property that three times its slope is equal to the sum of its

$x$-intercept and its $y$-intercept. For how many integers $q$ with $1 \leq q \leq 10000$ is there at least one positive integer $p$ so that there is exactly one triline through $(p, q)$ ?

(ie. with the underlined word positive added), then the following solution would have been correct:

Consider a line through the point $(p, q)$ with slope $m$.

The equation of this line is $y=m(x-p)+q=m x+(q-m p)$.

Thus, the $y$-intercept of this line is $y=q-m p$ and the $x$-intercept comes from setting $y=0$, which gives $x=\frac{m p-q}{m}$.

For this line to be a triline, we need $3 m=(q-m p)+\frac{m p-q}{m}$ or $3 m^{2}=q m-p m^{2}+m p-q$ or $(3+p) m^{2}-(p+q) m+q=0$.

Given a fixed point $(p, q)$, for there to be only one triline through $(p, q)$, there can be only one slope $m$ satisfying $(3+p) m^{2}-(p+q) m+q=0$, ie. this quadratic equation has exactly one real root. (The leading coefficient $3+p$ is non-zero since $p$ is positive.)

So for a fixed point $(p, q)$, the condition that there be only one triline through $(p, q)$ is that the discriminant of $(3+p) m^{2}-(p+q) m+q=0$ equals 0 , or

$$
\begin{aligned}
(p+q)^{2}-4(3+p) q & =0 \\
p^{2}+2 p q+q^{2}-12 q-4 p q & =0 \\
p^{2}-2 p q+q^{2}-12 q & =0 \\
(p-q)^{2} & =12 q
\end{aligned}
$$

So we must determine the number of integers $q$ with $1 \leq q \leq 10000$ such that there is an integer $p$ such that $(p-q)^{2}=12 q$.

In order for this to be true, $12 q$ needs to be a perfect square, so $3 q$ needs to be a perfect square. In order for $3 q$ to be a perfect square, $q$ needs to be 3 times a perfect square (since $q$ must contain an odd number of factors of 3 and even number of every other prime factor).

If $q=3 k^{2}$, then we can solve $(p-q)^{2}=12 q$ since then $\left(p-3 k^{2}\right)^{2}=36 k^{2}$ or $p-3 k^{2}= \pm 6 k$ or $p=3 k^{2} \pm 6 k$.

So how many integers $q$ between 1 and 10000 are of the form $q=3 k^{2}$ ? The minimum value of $k$ that works is $k=1$ and the maximum is $k=57$ (since $3(58)^{2}=10092$ is too large).

Therefore, there are 57 such values of $q$, ie. the answer would be (B).

However, the problem was posed as

A triline is a line with the property that three times its slope is equal to the sum of its

$x$-intercept and its $y$-intercept. For how many integers $q$ with $1 \leq q \leq 10000$ is there at least one integer $p$ so that there is exactly one triline through $(p, q)$ ?

Following the above solution, we arrive at needing one slope $m$ to satisfy the equation

$$
(3+p) m^{2}-(p+q) m+q=0
$$

There are two ways for this "quadratic" equation to have a single root - either if the discriminant is 0 , or if the leading coefficient $p+3$ is 0 (ie. the "quadratic" is actually linear).

So if $p=-3$, then we need the equation $(q-3) m+q=0$ to have exactly one solution for $m$, which it does for every $q$, as long as $q \neq 3$.

If $q=3$, then the value of $p=9$ makes the discriminant of the quadratic equation 0 .

In other words, every value of $q$ between 1 and 10000 has at least one integer $p$ so that there is exactly one triline through $(p, q)$, so there are 10000 values of $q$ that work.

Our apologies for any confusion that this may have caused.