Find all $x,y,p \in \Bbb Z$ with $p$ being a prime and $x^2-3xy+p^2y^2=12p.$

contest-math

Find all $x,y,p \in \Bbb Z$ with $p$ being a prime and $$x^2-3xy+p^2y^2=12p.$$

Looking at this mod $3$ one has that $$x^2+p^2y^2 \equiv0 \pmod{3}.$$

Since any square mod $3$ is either $0,1 $ we have that $x^2$ and $p^2y^2$ are both congruent to $0$ mod $3$. This would imply also that since they're both multiples of $3$ and squares we have that $x^2,p^2y^2 \equiv0 \pmod{9}.$ Thus $12p \equiv 0 \pmod{9} \Rightarrow p = 3.$

Now we have $$x^2-3xy+9y^2-36=0.$$

My idea was to use the quadratic formula here since we want integer solutions that might be something to look at. I got that $$x=\frac{3xy\sqrt{9x^2y^2-4(9y^2-36)}}{2}.$$

Now for integer solutions, the term inside the rad must be a perfect square right?

Solving for $9x^2y^2-36y^2+144=0 \Rightarrow x^2y^2-4y^2+16=0 \Rightarrow x^4-4=-\frac{16}{y^2}.$

So $y^2$ has to divide $16$, would imply that $y \pm2.$ For these $y$ values I get that $x=0.$

So possible solutions are $(0,2,3),(0,-2,3)$. However there seems to be more solutions still… Altogether there's six in total I think. What might I be missing here?

Best Answer

For $p=3$ the equation is equivalent to $$ (3y-x)x = 9(y + 2)(y - 2) $$ But for both cases, $y=2$ or $y=-2$ you name, we obtain two solutions for $x$, and not just $x=0$.

Moreover you missed the two solutions with $y=0$.

So indeed, altogether we have six solutions. We do not have more, since $16-3y^2$ must be a square, which is only true for $y=0,y=2,y=-2$.