How many ordered pairs of integers, $(m, n)$, satisfy \[ 5m^2 + 9n^2 = 1234567? \]

477 Views Asked by At

How many ordered pairs of integers, $(m, n)$, satisfy

$ 5m^2 + 9n^2 = 1234567? $

I started by trying to just solve the equation but ended up with either $m$ in terms of $n$ or $n$ in terms of $m$. I was unable to find pairs of $(m, n)$ consistantly using any method I know, and i don't know if its possible to get integer solutions only with a simple method.

How can I find integer solutions only in a simple way?

1

There are 1 best solutions below

0
On

None. Working mod $4$ suffices.

Note that exactly one of $n$, $m$ must be odd for $5m^2+9n^2$ to be odd. But as for any integer $x$, the resulting integer $x^2 \pmod 4$ is either $1$ or $0$, and thus, as both $5 \pmod 4 = 9 \pmod 4=1$, it follows that $5x^2 \pmod 4$ is either $1$ or $0$, and also, $9x^2 \pmod 4$ is either $1$ or $0$ as well. So from this it follows that if $5m^2+9n^2$ is odd, then $5m^2 + 9n^2 \pmod 4$ must be $1$. But note that $1234567 \pmod 4$ is $3$, so....