So on one of my math homeworks, I have this question:
Find all pairs of integers $(m,n)$ such that $m^2-n^2-2n=21.$
I'm lost on what my first step should be right now, I was thinking of difference of squares with $m^2-n^2$ but that leaves a big problem with the $-2n.$ Could I please have a hint as to what to do to factor?
Thanks!
Let first rewrite it: $$m^2-\overbrace{(n+1)^2}^{N^2}=20$$
Since the equation is even $(\pm m,\pm N)$ are solutions, so we can consider only the base case $(m,N)$ with $m\ge 0, N\ge 0$.
Since squares are growing fast then if the difference between two squares is small then the numbers themselves are small too.
Obviously here $m>N$ so let's write $m=N+a$ with $a>0$.
The equation becomes $(N+a)^2-N^2=a^2+2Na=20\iff a^2=20-\overbrace{2Na}^{\ge 0}\le 20\implies 1\le a\le 4$
You only have $4$ numbers to test:
$a=1\implies 2N+1=20\quad$ no integer solution
$a=2\implies 4N+4=20\implies N=4$
$a=3\implies 6N+9=20\quad$ no integer solution
$a=4\implies 8N+16=20\quad$ no integer solution
You end up with $(6,3)$ for $36-16=20$.
Factor your equation to $(m+N)(m-N)=2^2\times 5$
You need to solve for all the possible products (with the constraint $m+N>m-N>0$):
$m+N=20,\ m-N=1\quad$ no integer solution
$m+N=10,\ m-N=2\implies m=6,N=4$
$m+N=5,\ m-N=4\quad$ no integer solution