25. Suppose $m$ and $n$ are integers with $0<m<n$. Let $P=(m, n), Q=(n, m)$, and $O=(0,0)$. For how many pairs of $m$ and $n$ will the area of triangle $O P Q$ be equal to 2024 ?
A 4
B 6
C 8
D 10
E 12
Solution
B
Taking $P Q$ as the base, triangle $O P Q$ has height $|O M|$, where $M$ is the midpoint of $P Q$ and is given by:
$$
M=\left(\frac{n+m}{2}, \frac{n+m}{2}\right)
$$

By Pythagoras,
$$
|P Q|=\sqrt{(m-n)^{2}+(n-m)^{2}}=\sqrt{2}|n-m| .
$$

As $m<n,|P Q|=\sqrt{2}(n-m)$. The length of $O M$, can be found similarly:
$$
|O M|=\sqrt{\left(\frac{n+m}{2}\right)^{2}+\left(\frac{n+m}{2}\right)^{2}}=\frac{n+m}{\sqrt{2}} .
$$

Therefore the area of the triangle $O P Q$ is given by,
$$
\frac{1}{2}(|P Q| \times|O M|)=\frac{1}{2}\left(\sqrt{2} \times(n-m) \times \frac{n+m}{\sqrt{2}}\right)=\frac{(n+m)(n-m)}{2} .
$$

Hence $\frac{(n+m)(n-m)}{2}=2024$, therefore $(n+m)(n-m)=4048$.

Since $m$ and $n$ are both integers $n+m$ and $n-m$ are both even or both odd.
There are six ways that $4048=2^{4} \times 11 \times 23$ can be represented as a product of two even numbers: $2 \times 2024,2^{2} \times 1012,2^{3} \times 506,(2 \times 11) \times\left(2^{3} \times 23\right),\left(2^{2} \times 11\right) \times\left(2^{2} \times 23\right),\left(2^{3} \times 11\right) \times(2 \times 23)$, so there are 6 possible pairs of $(n, m):\{(1013,1011),(508,504),(257,249),(103,81),(68,24),(67,21)\}$.