Let $a$ and $b$ be positive integers. Suppose that there are infinitely many pairs of positive integers $(m,n)$ for which $m^2+an+b$ and $n^2+am+b$ are both perfect squares. Prove that $a$ divides $2b$. Holden Mui
Problem
Source: TSTST 2021/4
Tags: USA TSTST, algebra, number theory
13.12.2021 20:00
We will treat $a$ and $b$ as fixed constants. Suppose for some $x,y\in \mathbb{Z}_{\ge 1}$ we have \begin{align*} m^2+an+b&=(m+x)^2 \\ n^2+am+b&=(n+y)^2. \end{align*}Claim: $x,y \le (ab)^{100}$. Proof: From the first equation, $n=\tfrac{2mx+x^2-b}{a}$. From the second equation, $n^2+am+b\ge (n+1)^2$, so $am+b\ge 2n+1$. Hence \begin{align*} am+b\ge 2n+1 &\implies am+b\ge 2\left(\tfrac{2mx+x^2-b}{a}\right)+1 \\ &\implies a^2m+ab \ge 4mx+2x^2-2b+a \\ &\implies 2x^2+(4m)x+(a-2b-a^2m-ab) \le 0 \\ &\implies 2(m+x)^2 \le 2\left(m+\tfrac{a^2}{4}\right)^2-2\left(\tfrac{a^2}{4}\right)^2+ab-a+2b \\ &\implies 2(m+x)^2 \le 2\left(m+(ab)^{100}\right)^2 \\ &\implies x\le (ab)^{100}. \end{align*}By symmetry, $y\le (ab)^{100}$ too. $\blacksquare$ Simplifying the initial two equations: \begin{align*} (2x)m-(a)n&=b-x^2\\ (a)m-(2y)n&=y^2-b. \end{align*}By the Claim, there are finitely many possibilities for $(x,y)$. Each such $(x,y)$ results in at most $1$ solution $(m,n)$ in the above system, unless the system is linearly dependent. So if none of the systems are linearly dependent, we will end with finitely many solutions $(m,n)$, contradiction. Hence there exists at least one $(x_0,y_0)$ for which the system is linearly dependent. Then the equations scale to each other, so \[ \frac{2x_0}{a}=\frac{a}{2y_0}=\frac{b-x_0^2}{y_0^2-b}. \]The first equality above implies $a=2\sqrt{x_0y_0}$. So $x_0=dx_1^2$ and $y_0=dy_1^2$ for some coprime positive integers $x_1$ and $y_1$. Then $a=2dx_1y_1$, and solving for $b$ with the second equality gives $b=d^2x_1y_1(x_1^2-x_1y_1+y_1^2)$. Now clearly $a\mid 2b$.
13.12.2021 20:07
Claim: There is a constant $c$ such that for infinitely many of the $(m,n)$ we have$$n^2+am+b=(n+c)^2.$$
The claim is equivalent to having $am+b=2nc+c^2$ for infinitely many $(m,n)$ (denote this equation as $(\spadesuit)$). For each of these $(m,n)$, by solving for $n$ in terms of $m$, we get$$m^2+a\left(\frac{am+b-c^2}{2c}\right)+b=m^2+\frac{a^2}{2c}m+\frac{a(b-c^2)}{2c}+b$$is a square for infinitely many $m$. It is a fact that if a polynomial $x^2+px+q$ is an integer for infinitely many $x$, then we must have $\left(\tfrac{p}{2}\right)^2=q$ (otherwise it gets stuck between two of $(x+\tfrac{p-1}{2})^2, (x+\tfrac{p}{2})^2, (x+\tfrac{p+1}{2})^2$ for large enough $x$). This means we must have \begin{align*} \left(\frac{a^2}{4c}\right)^2&=\frac{a(b-c^2)}{2c}+b\\ \implies a^4&=8ac(b-c^2)+16bc^2 \end{align*}which we denote as $(\clubsuit)$. By combining $(\spadesuit)$ and $(\clubsuit)$ we can now finish the problem: Claim: For any odd prime $p$ we have $\nu_p(a) \le \nu_p(b)$.
Claim: We have $\nu_2(a) \le \nu_2(b)+1$.
13.12.2021 22:16
Say infinitely many pairs $(m_1, n_1), (m_2, n_2) ,\ldots $ (WLOG $m_i \leq n_i$)work. For each pair, $(m_i, n_i)$ there is $(r_i, s_i) \in \mathbb{Z_{+}}^2$ for which $m_i^2 + an_i + b = (m_i + r_i)^2$ and $n_i^2 + am_i + b = (n_i + s_i)^2$. I claim that for all pairs $(m_i, n_i)$ sufficiently large, say $m, n > a^9b^9 + 10^{100}$, of which there must be infinitely many, that $r_i \leq \frac14 a(a+1)$ and $s_i \leq \frac{a}{2}$. Indeed, check that if $s_k > \tfrac{a}{2}$, then\[(n_k + s_k)^2 = n_k^2 + (2s_k)n_k + s_k^2 > n_k^2 + am_k + b\]since $2s_kn_k - am_k \geq (2r_k - a)m_k$ clearly overtakes $b - s_k^2$ for $m_k$ large enough. The $r_k$ bound is a little more difficult to establish. Note that for\[n_k^2 + am_k + b \geq (n_k + 1)^2 \implies am_k \geq 2n_k - (b-1) \implies m_k \geq \frac{2n_k - (b-1)}{a} \geq \frac{2}{a+1}n_k\]for $n_k$ large enough. Thus, if $r_k > \frac{a(a+1)}{4}$, then note that\[(m_k + r_k)^2 = m_k^2 + (2r_k)m_k + r_k^2 > m_k^2 + \frac{a(a+1)}{2}m_k + b \geq m_k^2 + an_k + b\]for sufficiently large $m_k$ since $2r_k > \frac{a(a+1)}{2}$. Thus, $r_i, s_i$ are bounded and thus there can only be finitely many possible distinct pairs $(r_i, s_i)$ across infinitely many pairs $(m_i, n_i)$. Hence, we can find two distinct pairs $(m_a, n_a)$ and $(m_b, n_b)$ that are solutions to\[x^2 + ay + b = (x + c)^2, y^2 + ax + b = (y + d)^2\]in $(x, y)$ for some positive integer constants $c, d$. Simplifying this system yields the linear system $2cx - ay = b - c^2$ and $ax - 2dy = d^2 - b$. This system has $\geq 2$ solutions, so it must infinitely many solutions, only possible if one equation is scaled from the other. Thus, \[\frac{2c}{a} = \frac{a}{2d} = \frac{b - c^2}{d^2 - b}\]from which we can obtain $a = 2\sqrt{cd}$ and $b = \tfrac{c^2\sqrt{d} + d^2\sqrt{c}}{\sqrt{c} + \sqrt{d}}$, from which the result follows.
13.12.2021 22:28
For each pair \((m,n)\), note \(n^2+am+b\ge(n+1)^2\), implying \(n\le\frac12(am+b-1)\). It follows that for each fixed \(m\) there are finitely many pairs \((m,n)\), so both \(m\) and \(n\) grow arbitrarily large. Let \begin{align*} m^2+an+b&=(m+k)^2\\ \text{and}\quad n^2+am+b&=(n+\ell)^2. \end{align*}We have \[m^2+an+b\le m^2+\tfrac12a^2m+\text{constant}<\left(m+\tfrac14a^2+1\right)^2\]for large enough \(m\), so \(k,\ell\le\frac14a^2+1\). Thus there are finitely many possible pairs \((k,\ell)\), so by Pigeonhole, one such pair produces infinitely many \((m,n)\). That is, the linear equations \begin{align*} an+b&=2km+k^2\\ \text{and}\quad am+b&=2\ell n+\ell^2 \end{align*}are linearly equivalent. Solving, we have \begin{align*} a^2n+ab-ak^2&=2akm=4k\ell n+2k\ell^2-2bk\\ \implies (a^2-4k\ell)n&=2k\ell^2-2bk-ab+ak^2. \end{align*}It follows that \[0=a^2-4k\ell=2k\ell^2-2bk-ab+ak^2.\]Since \(a^2=4k\ell\), \(a\) is even, so let \(a=2c\); then \(c^2=k\ell\) and \begin{align*} 0&=2k\ell^2-2bk-2cb+2ck^2\\ \implies b(c+k)&=ck^2+k\ell^2=ck^2+c^2\ell. \end{align*}It is easy to show from here that \(b=c(k+\ell-c)\). In particular, \(c\mid b\), so \(a\mid2b\) as desired.
13.12.2021 22:35
how many points do I have if I did everything right up until I got the system of equations with inf many solutions but then trolled and wrongly concluded that they had to be the same equation instead of equivalent up to scaling begging for 7-
13.12.2021 22:35
Bashy sol WLOG we always assume $n \leq m$ for any such $(m,n)$. Then $$m^2 < m^2+an+b \leq m^2+am+b < (m+a+b)^2$$and the middle one is perfect square infinitely often. Therefore there is some positive integer $k<a+b$ such that $m^2+an+b=(m+k)^2$ infinitely often. We will only work with these pairs $(m,n)$ from now on. Rearranging, we get $$m=\frac{an+b-k^2}{2k}$$for all such pairs. Call the above equation the one. Now, we also have $n^2+am+b=(n+t)^2$ infinitely often for some $t>0$. Solving this we get, along with the one, we get $$n=\frac{2kb+ab-2t^2k-ak^2}{4tk-a^2}$$Since $n$ only depends on $t$, and $m$ only depends on $n$, $t$ must take infinitely many values. $$\implies 4tk-a^2 \mid 2t^2k+ak^2-2kb-ab \mid 16t^2k^2+8ak^3-16k^2b-8kab$$for infinitely many $t$. $$\implies 4tk-a^2 \mid a^4+8ak^3-16k^2b-8kab$$Since $t$ can take infinitely many values, $4tk-a^2$ can be as large as possible, so the RHS (which is independent of $t$) must be $0$. Thus: $$a^4+8ak^3-16k^2b-8kab=(a+2k)(a^3-2a^2k+4ak^2-8kb)=0$$$$\implies 8kb=a^3-2a^2k+4ak^2$$since $a,k>0$. Call the above equation the two. Now let $p$ be any odd prime dividing $a$. If $v_p(k) \leq v_p(a)$, then from the two we get $v_p(RHS) \geq v_p(4ak^2)= v_p(a)+2v_p(k)$ and $v_p(LHS)=v_p(b)+v_p(k)$ $\implies$ $v_p(b) \geq v_p(a)+v_p(k) \geq v_p(a)$ as required. Else $v_p(k) \geq v_p(a)$. In that case, from the one we get $k \mid an+b-k^2$ $\implies$ $k \mid an+b$. Now if $v_p(b)<v_p(a) \leq v_p(an)$, we get $v_p(an+b)=v_p(b)<v_p(k)$, contradiction! Hence $v_p(b) \geq v_p(a)$ in this case as well. Finally we look at $v_2$. If $a$ is odd we have nothing to prove, so assume $a$ is even. Write $a=2c$, then the two becomes $$kb=c^3-c^2k+ck^2$$Again, if $v_2(k) \leq v_2(c)$, then in the above equation $v_2(RHS) \geq v_2(ck^2) = v_2(c)+2v_2(k)$ and $v_2(LHS)=v_2(k)+v_2(b)$ $\implies$ $v_2(b) \geq v_2(c)+v_2(k) \geq v_2(c)=v_2(a)-1$. Else $v_2(k) \geq v_2(c)+1=v_2(a)$, and using the one the same as the above paragraph gets us $v_2(b) \geq v_2(a)>v_2(a)-1$ in this case as well. In conclusion, from the two paragraphs above we get $a \mid 2b$.
13.12.2021 22:45
My problem
14.12.2021 08:23
The_Turtle's reign over all recent 1/4's in USA contests continues! Fix an $(m,n)$ and let $m^2 + an + b = (m+p)^2$ and $n^2 + am + b = (n+q)^2$. WLOG let $m \ge n$ and since we have $an + b = 2mp + p^2 \ge 2np + p^2$ implying only finitely many values of $p$ are possible, for obvious reasons. But we also have $an + b \ge 2m+1 \implies m \le \frac{an+b-1}{2}$, and so since we have $am + b = 2nq + q^2$, we have $2nq + q^2 \le \frac{a(an+b-1)}{2}$ which gives that there are only finitely many values of $q$ possible as well. So some pair of $(p,q)$ occurs infinitely many times. We have that $an - 2pm = p^2 - b$ and $am-2qn = q^2 - b$, which should have only one solution for this $(p,q)$, which can't happen so these equations are scaled versions of each other, implying $\frac{a}{2q} = \frac{2p}{a} = \frac{p^2 - b}{b - q^2}$, so $a^2 = 4pq$ and so let $p,q = kz_1^2, kz_2^2$, so $a = 2kz_1z_2$. This means $\frac{p^2 - b}{b - q^2} = \frac{z_1}{z_2}$ which on solving gives $b(z_1 + z_2) = k^2(z_1z_2^4 + z_2z_1^4) \implies 2b = 2k^2z_1z_2(z_1^2 + z_2^2 - z_1z_2)$, $a = 2kz_1z_2$ obviously divides this, so we are done. $\blacksquare$
22.12.2021 19:54
If those numbers are squares, then there must be positive integers $x,y$ such that \[ m^2 + an+b = (m+x)^2, \quad n^2+am+b = (n+y)^2\]Simplifying gives \[ an+b = x^2 + 2mx, \quad am+b = y^2 + 2ny\]Note that all numbers are positive, we have $(a+b)n > an+b > 2mx$ and $(a+b)m > am+b > 2ny$, hence $(a+b)^2 > 4xy$. Therefore, there are only finitely many pairs of $x,y$. As there are infinitely many solutions, then there is one $(x,y)$ which is associated to infinitely many $m,n$. Fix this $x,y$, we now have two linear equations on $m,n$ which has infinitely many solutions. Hence $a^2 = 4xy$, and a few computation leads to $2b = a(2x+2y-a)$.
24.12.2021 18:26
Seems like a pretty random result (not in a derogatory way).
14.01.2022 16:42
Call a satisfactory pair $(m,n)$ exceptional. Note that infinitely many pairs $(m,n)$ must be exceptional by ordering any given pair appropriately; if there were a finite number $N$ of such pairs, there would be at most $2N$ total exceptional pairs. Moreover, infinitely many pairs $(m,n)$ with $m\ge n$ and $m\ge b$ are exceptional, as there are at most $\binom b2$ exceptional pairs with $m<b$. We now focus on such exceptional pairs. Note that $m^2 < m^2+an+b \le m^2+am+b \le m^2+m(a+1) \le m^2+2am \le (m+a)^2$. Thus for each pair $(m,n)$, the positive constant $c_{m,n}$ such that $m^2+an+b = (m+c_{m,n})^2$ satisfies $0\le c_{m,n} \le a$. Hence some particular $c=c_{m,n}$ occurs infinitely many times. Now focus on all pairs $(m,n)$ with $m\le n, m\ge b, c_{m,n} = c$. We have $m^2+an+b = (m+c)^2 = m^2 + 2mc+c^2$. That is, $an+b = 2mc+c^2$. So we can write $m = \frac{an+b-c^2}{2c}$. Then we have that \[n^2 + a\cdot \frac{an+b-c^2}{2c} + b = n^2 + \frac{a^2}{2c}n + \frac{ab}{2c}-\frac{ac}{2}+b\]is a perfect square. We multiply through by $16c^2$ for ease of dealing with the condition, so instead we consider that $16c^2n^2+8ca^2n + 8abc - 8ac^3+16bc^2$ is a perfect square. Write this expression as \[(4cn+a^2)^2 - a^4+8abc-8ac^3+16bc^2.\]Taking sufficiently large $n$ implies that the constant $-a^4+8abc-8ac^3+16bc^2$ is zero, as for $4cn+a^2>|-a^4+8abc-8ac^3+16bc^2|$, \[(4cn+a^2+1)^2 > (4cn+a^2)^2 - a^4+8abc-8ac^3+16bc^2 > (4cn+a^2-1)^2.\]Thus we have $a^4+8ac^3 = 8abc+16bc^2$. Divide $a+2c$ from both sides to yield $a(a^2-2ac+4c^2) = 8bc$. Remark that $\frac{(4cn+a^2)^2}{16c^2} = (n+\frac{a^2}{4c})^2$ ought to be a perfect square as well, so $n+\frac{a^2}{4c}$ is an integer and $4c\mid a^2$. It is then clear that $2\mid a$. Now write \[a \cdot \left(\frac{a^2}{4c} - \frac a2 + c\right) = 2b.\]Since $\frac{a^2}{4c} - \frac a2 + c$ is an integer, the result follows.
19.01.2022 05:17
Please read my alternate proof of the lemma (the one in a hide tag). Let $m^2+an+b=(m+r)^2$ and $n^2+am+b=(n+s)^2$ for positive integers $r$ and $s$. Lemma: There are finitely many $r$ and $s$ for which there are positive integer solutions to the system of equations. Proof: The first equation simplifies to $m^2+an+b=m^2+2rm+r^2\implies an+b=2rm+r^2$. The second equation simplifies to $n^2+am+b=n^2+2sn+s^2\implies am+b=2sn+s^2$. The second equation implies $am+b\ge 2n+1$. Note that $n=\frac{2rm+r^2-b}{a}$. So \begin{align*} & am+b \ge 2\left(\frac{2rm+r^2-b}{a}\right)+1 \\ \\ \implies & a^2m+ab\ge 4rm+2r^2-2b+a \\ \\ \implies & 4rm+2r^2-a^2m-ab-2b+a\le 0 \\ \\ \implies & (m+r)^2-a^2m-ab-2b+a\le m^2 \\ \\ \implies & (m+r)^2\le m^2+a^2m+(a+2)b-a \\ \\ \implies & (m+r)^2\le (m+a^{665}b^{665})^2 \\ \\ \implies & r\le a^{665}b^{665} \end{align*} Similar inequality can be constructed for $s$ using the two facts, $an+b\ge 2m+1$ and $m=\frac{2sn+s^2-b}{a}$. This proves our Lemma as $a$ and $b$ are fixed constants. $\blacksquare$
Now we have $an=2rm+r^2-b$ and $2sn=am+b-s^2$. Since there are only finitely many $r$ and $s$ which give integer solutions, for some $r$ and $s$, \[\frac{a}{2s}=\frac{2r}{a}=\frac{r^2-b}{b-s^2}.\] Thus, $4rs=a^2$, which implies $rs$ is a perfect square. Now we can write $r=px^2$ and $s=py^2$, where $p,x,y$ are positive integers with $\gcd(x,y)=1$. So $a=2pxy$. Now we have $\frac{p^2x^4-b}{b-p^2y^4}=\frac{2pxy}{2py^2}=\frac{x}{y}$. Thus, \[x(b-p^2y^4)=y(p^2x^4-b)\implies xb-p^2y^4x=p^2x^4y-yb\implies (x+y)b=p^2x^4y+p^2y^4x=p^2xy(x^3+y^3)\] So $(x+y)b=p^2xy(x+y)(x^2-xy+y^2)\implies b=p^2xy(x^2-xy+y^2)$, so $a\mid 2b$.
30.08.2023 00:33
death. Fir suppose $m^2+am+b$ is a square infinitely often. If $a$ is even its distance from the perfect square $(m+\tfrac{a}{2})^2$ is fixed and thus must be $0$, hence $b=\tfrac{a^2}{4}$, and $\tfrac{2b}{a}=\tfrac{a}{2}$ which is an integer, and otherwise for sufficiently large $m$ we can bound the expression strictly between $(m+\tfrac{a-1}{2})^2$ and $(m+\tfrac{a+1}{2})^2$. Therefore suppose that this is not the case; we will only use the fact that there now exist infinitely many pairs with $m>n$ and consider only those pairs. Let $n=m-k$ for some positive integer $k$. Obviously we can find pairs with $m$ arbitrarily large. Suppose that $m^2+an+b=(m+p)^2$ and $n^2+am+b=(m-k+q)^2$; clearly $p$ and $q$ are positive.. First off, since $m^2+an+b \leq (m+\tfrac{a+1}{2})^2$ for large enough $m$, hence the possibilities for $p$ are bounded. In particular some choice of $p$ must be used infinitely many times. Only consider $m$ corresponding to this choice; we have that $$m^2+am+(b-ak)=m^2+2pm+p^2 \iff k=\left(1-\frac{2p}{a}\right)m+\frac{b-p^2}{a}$$must hold for all such $m$. In particular, since $p>0$, the quantity $m-k$ should grow linearly in $m$. Now from our other equation, we should have $$m^2+(a-2k)m+(b+k^2)=m^2+(2q-2k)m+(q^2-2qk+k^2) \iff am+b=2qm-2qk+q^2 \iff q=\frac{am+b-q^2}{2(m-k)}.$$Since $m-k$ exhibits linear growth in $m$, it follows that $q$ is bounded as well. Thus some choice of $q$ must be used infinitely many times as well, so henceforth only consider $m$ corresponding to both the previous choice of $p$ and this choice of $q$ (treat $p$ and $q$ as fixed). By substituting the value of $k$ into the above (middle) equation, we find that $$am+b=2qm-\left(2q-\frac{4pq}{a}\right)m-\frac{2q(b-p^2)}{a}+q^2$$holds for infinitely many choices of $m$, so it holds as a polynomial identity. In particular, by equating linear coefficients we should have $a^2=4pq$. Therefore substitute $p=dx^2$ and $q=dy^2$ for some $d,x,y \in \mathbb{Z}^+$, so $a=2dxy$. Then by equating the constant coefficients, we obtain $$b=-\frac{2q}{a}b+q^2+\frac{2p^2q}{a} \implies b=\frac{aq^2+2p^2a}{a+2q}=\frac{2k^3xy^5+2k^3x^4y^2}{2kxy+2ky^2}=k^2xy(x^2-xy+y^2),$$so clearly $2kxy \mid 2k^2xy(x^2-xy+y^2) \implies a \mid 2b$. $\blacksquare$
24.03.2024 23:25
Xooooook WLOG $m\geq n$. Claim: There is some $C$ such that $m^2+an+b=(m+C)^2$ infinitely often Proof. Note that \[m^2+an+b\leq m^2+am+b \leq (m+1434ab)^2\]so $C$ can take finitely many values as desired. $\blacksquare$ Now, we have that $an+b=2mC+C^2$ infinitely often. The rest of the solution is pretty much computation. Note that from $m^2+an+b=(M+C)^2$ we get $m=\frac{an+b-C^2}{2C}$ by rearranging. Thus \[n^2+am+b=n^2+a\left( \frac{an+b-C^2}{2C}\right)+b = n^2 + n\left(\frac{a^2}{2C}\right)+\frac{a(b-C^2)}{2C}\]Now, this must be perfect square for infinitely many $n$. If it was not the square of a binomial with integer coefficients then we could bound it between $(n+a)^2$ and $(n+a+1)^2$ for some $a$ and sufficiently large $n$. Thus we find that $\frac{a^2}{2C}$ is even and also \[\left(\frac{a^2}{4C}\right)^2=\frac{a(b-C^2)}{2C}+b= b\left(1+\frac{a}{2C}\right)-\frac{aC}{2}.\]This means that \[b=\frac{\left(\frac{a^2}{4C}\right)^2+\frac{aC}{2}}{1+\frac{a}{2C}}=\frac{a^4+8aC^3}{16a^2+8aC}=\frac{a(a+2C)(a^2-2Ca+(2C)^2)}{8C(2C+a)} =\frac{a(a^2-2Ca+(2C)^2)}{8C}\]by simplification and sum of cubes. Thus \[2b=\frac{a(a^2-2Ca+(2C)^2)}{4C}=a\left(\frac{a^2}{4C}-\frac{a}{2}+C\right)\]Which finishes as we showed that $\frac{a^2}{2C}$ is even which also implies $a$ is even so $\frac{a^2}{4C}-\frac{a}{2}+C$ is an integer as desired.