-1
$\begingroup$

Under what conditions for $a$ and $b$ are $(1)$ and $(2)$ integers? $$\sqrt{a^2-4b}\tag{1}$$ $$\sqrt{b^2-4a}\tag{2}$$ Apologies, but my only attempt is to show that $a^2-4b$ and $b^2-4a$ are perfect squares, but even on that I have no idea how to approach.

$\endgroup$
  • 2
    $\begingroup$ Did you by any chance come from here? $\endgroup$ – TheSimpliFire Mar 11 '18 at 16:40
  • $\begingroup$ Unfortunately, no. But I can see why you would say that. :) $\endgroup$ – John Glenn Mar 11 '18 at 16:44
  • $\begingroup$ An answer to this question would solve the one in the link :) $\endgroup$ – TheSimpliFire Mar 11 '18 at 16:46
  • $\begingroup$ Yes I see that :) This tells me to use modular arithmetic, binary search or the integer version of newton's method, but I have no idea to use them. $\endgroup$ – John Glenn Mar 11 '18 at 16:50
  • $\begingroup$ I have found one condition $ab\ge 16$ but i don't think it would be complete. $\endgroup$ – dssknj Mar 11 '18 at 17:28
1
$\begingroup$

We claim the only solutions are $(4,4)$, $(5,6)$, and $(6,5)$.

Without loss of generality, let $a\leq b$. Then either $b\leq 4$ or

$$(b-3)^2 <b^2-4b \leq b^2-4a \leq b^2.$$

(we have that $(b-3)^2<b^2-4b$ if $b>9/2$.) The case where $b\leq 4$ can be hand-bashed out to reveal only the solution $\boxed{(4,4)}$. Otherwise, as $b^2-4a$ is a square between $(b-3)^2$ and $b^2$, it is either $(b-2)^2$ or $(b-1)^2$. However, we have

$$b^2-4a=(b-1)^2=b^2-2b+1 \implies 4a=2b-1,$$

which is a contradiction since $2b-1$ is odd and thus not a multiple of $4$. So, $b^2-4a=(b-2)^2$, which gives $a=b-1$. Then, we have that

$$a^2-4b=(b-1)^2-4b=b^2-6b+1$$

is a square. However, if $b\geq 15/2$, we have that

$$(b-4)^2=b^2-8b+16 < b^2-6b+1 < b^2-6b+9 = (b-3)^2,$$

a contradiction. Thus, $b\leq 15/2$, reducing the problem to a finite case check revealing only $\boxed{(5,6)}$, and correspondingly $\boxed{(6,5)}$.

$\endgroup$
  • $\begingroup$ Have you considered negative values? e.g. $a=2$ and $b=-3$ $\endgroup$ – James Arathoon Mar 12 '18 at 0:03
  • $\begingroup$ sorry missed comment above that $a$ and $b$ positive. $\endgroup$ – James Arathoon Mar 12 '18 at 0:11
  • $\begingroup$ @JamesArathoon I haven't (per the comment), but after some testing it seems as if the only solutions are those with $a+b=-1$ and $a=-n^2,b=0$ or vice versa. $\endgroup$ – Carl Schildkraut Mar 12 '18 at 0:29
  • $\begingroup$ @JamesArathoon Just an addendum; it's actually not that hard to prove that the solutions mentioned in my previous comment are the only ones where one of $\{a,b\}$ is allowed to be non-positive: just split into cases and use the fact that there are no positive integers $a,b$ such that $a^2+4b$ is a square and $b\leq a$. $\endgroup$ – Carl Schildkraut Mar 12 '18 at 1:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.