Find all the pairs of positive integers $(m,n)$ such that the numbers $A=n^2+2mn+3m^2+3n$, $B=2n^2+3mn+m^2$, $C=3n^2+mn+2m^2$ are consecutive in some order.
Problem
Source:
Tags: number theory proposed, number theory
02.11.2010 16:00
WakeUp wrote: Find all the pairs of positive integers $(m,n)$ such that the numbers $A=n^2+2mn+3m^2+3n$, $B=2n^2+3mn+m^2$, $C=3n^2+mn+2m^2$ are consecutive in some order. Let's solve the problem over integers. We have \[C-B=n^2-2mn+m^2=(n-m)^2 \geq 0\] So $C>B.$ So we have $C-B=2$ or $C-B=1.$ Clearly the first case is not accepted because $C-B=(n-m)^2.$ So we have $C-B=1.$ \[C-B=(n-m)^2=1 \implies n-m = \pm 1 \implies n = m \pm 1\] If $n=m-1,$ then \[A=(m-1)^2+2m(m-1)+3m^2+3(m-1)=6 m^2-m-2,\]\[ B=2(m-1)^2+3m(m-1)+m^2=6 m^2-7 m+2,\]\[ C=3(m-1)^2+m(m-1)+2m^2=6 m^2-7 m+3\] So $A>C$ and $A>C>B.$ This means $A=C+1.$ So we have \[6 m^2-m-2=6 m^2-7 m+3+1 \implies m=1\] And $n=m-1=0.$ So in this case we have the solution $(m,n)=(1,0).$ If $n=m+1,$ then \[A=(m+1)^2+2m(m+1)+3m^2+3(m+1)=6 m^2+7 m+4, \]\[B=2(m+1)^2+3m(m+1)+m^2=6 m^2+7 m+2, \]\[C=3(m+1)^2+m(m+1)+2m^2=6 m^2+7 m+3 \] Which are three consecutive integers. So the condition holds for every $m,n \in \mathbb Z$ such that $n=m+1.$ And so the solutions are $(m,n)\in \{(1,0) , (k-1,k)\}$ where $k$ is an integer.
07.05.2023 22:46
@above nice solution! I saw that C-B was a perfect square, which showed that C-B=1, then it reduced the casework by a lot, rather than needing to test A>B>C, A>C>B, ... all those 6 cases. Also note that (1,0) is not a solution because it says m and n are positive integers.