1

How to find the integer solution of the equation

$$\frac{m^2 + 2mn + n^2 -3m -n+2}{2}=2$$

I know that there is a unique solution

3 Answers3

3

By inspection, $m=2$, $n=1$.

Remark: For more information, look for the Cantor Pairing Function. There are explicit expressions for the two "unpairing" functions that recover the first and second coordinates from the result when the pairing function has been applied to $(m,n)$.

André Nicolas
  • 507,029
  • Umm, those values do not solve the stated equation. I get that there are no possible integer solutions, as $m + n$ is irrational. Error in equation? Have I made a stupid mistake? – Stephen Herschkorn Aug 14 '13 at 03:01
  • 1
    Oops. Indeed, I was making two stupid mistakes. Sorry! – Stephen Herschkorn Aug 14 '13 at 03:12
  • @ André Nicolas : yes, I just formulated the map from $N XN$ to $N$ for Cantor Pairing function. I am asking whether it is possible to solve with some standard method ? –  Aug 14 '13 at 05:57
  • Look at the "undoing" functions in the Wikipedia article. You will have to modify a little. Nothing fancier than square root and integer part is involved. – André Nicolas Aug 14 '13 at 06:01
0

In fact there are infinitely many integer solutions, though only one in positive integers.

Write $s=m+n,d=m-n$ then your problem can be rewritten as $$ d=(s-1)^2-3 $$ We can choose any value for $s$ and get a solution, e.g. $$ (m,n) = (-1,1),(-1,2),(0,2),(2,1),(5,-1),(9,-4),\ldots $$ If we want to constrain $m>0,n>0$ then that gives us the constraints $$ s>0, \quad d\le s-2, \quad d\ge 2-s $$ which leaves only one solution.

Zander
  • 10,948
  • 1
  • 26
  • 54
0

equation:

$\frac{m^2+2mn+n^2-3m-n+2}{2}=2$

Has the solutions:

$n=2-\frac{k(k\mp1)}{2}$

$m=\frac{k(k\pm1)}{2}-1$

$k$ - any integer.

individ
  • 4,301