Mock AIME I 2015 Problems/Problem 7

Problem 7

For all points $P$ in the coordinate plane, let $P'$ denote the reflection of $P$ across the line $y=x$. For example, if $P=(3,1)$, then $P'=(1,3)$. Define a function $f$ such that for all points $P$, $f(P)$ denotes the area of the triangle with vertices $(0,0)$, $P$, and $P'$. Determine the number of lattice points $Q$ in the first quadrant such that $f(Q)=8!$.


Solution

Let the point $P$ have the coordinates $(x,y)$. We can then represent $P'$ as the point with the coordinates $(y,x)$. We can assume that $x>y$ and then multiply our answer by $2$ at the end to account for the case where $x<y$. We can safely ignore the case where $x=y$, since this leads to a degenerate triangle between $(0,0)$, $P$, and $P'$.

We can then devise an expression that represents the area of a triangle with the points $(x,y)$, $(y,x)$, and $(0,0)$. We can see that the distance from $(0,0)$ to $(x,y)$ is the same as the distance from $(0,0)$ to $(y,x)$. Therefore, the triangle is isosceles, with $\overline{PP'}$ as the base.

The length of the base $\overline{PP'}$ can be found with the distance formula: \[\sqrt{(x-y)^2+(y-x)^2}=\sqrt{2x^2-4xy+2y^2}=\sqrt{2}*\sqrt{x^2-2xy+y^2}=\sqrt{2}(x-y)\]

Next, to find the distance from the origin to $\overline{PP'}$, we note that since the triangle is isosceles, the altitude is from the origin to the midpoint of $\overline{PP'}$. Therefore, we can find the midpoint of $\overline{PP'}$ as $(\frac{x+y}{2},\frac{x+y}{2})$. Then, we can use the distance formula to find the distance from the origin to the midpoint of $\overline{PP'}$ as $\sqrt{2}*\frac{x+y}{2})$.

Then, we can find the area of the triangle by \[\frac{\sqrt{2}*\frac{x+y}{2} * \sqrt{2}(x-y)}{2}=\frac{(x+y)(x-y)}{2}\]

We set this equal to $8!$, and we get the equation $(x+y)(x-y)=8!*2$. We take the prime factorization of 8! to get $(x+y)(x-y)=2^8*3^2*5*7$. In order to get integer solutions for $x$ and $y$, both $x+y$ and $x-y$ have to have the same parity. Otherwise, $x$ and $y$ would not be integers. Since $2^8*3^2*5*7$ is clearly even, both $x+y$ and $x-y$ have to be even.

We can set $x+y$ to $2a$ and $x-y$ to $2b$ in order to represent this. Since both $x$ and $y$ are positive, we have that $a>b$. Each solution $(a,b)$ to $2a*2b=2^8*3^2*5*7$, or $ab=2^6*3^2*6*7$, we have a solution for $xy$. We can find these solutions by counting the number of factors of $2^6*3^2*5*7$. We calculate this with $(6+1)(2+1)(1+1)(1+1)=84$.

We then divide this by $2$ to get the number of solutions where $a>b$. We then multiply the answer by $2$ to account for our original assumption of $x>y$. As a result, our final result is \[\frac{84}{2} * 2=84\]