10

If $a$, $b$ are co-prime integers, how can I prove that $a^2 + b^2 + ab$ and $a^2 + b^2 - ab$ cannot be perfect squares? I know that perfect squares should be capable of expression in the form $a^2 + b^2 + 2ab$ and $a^2 + b^2 - 2ab$, but it is not immediately clear to me that there might not be other integers $x$, $y$ that would work even if $a$, $b$ do not. Thanks if anybody can help.

I should have said that $a$, $b$ are distinct integers and are both positive so that they could not both be equal to 1.

Please note that the premise of this question has now been disproved with a straightforward counter example, which is all the answer I require. Thanks to everyone who has taken the trouble to contribute. I am grateful for the help but won't be continuing to monitor further responses.

  • try subtracting your expression from $(a+b)^2$, and remember $a$,$b$ are co-prime – aradarbel10 Jan 17 '20 at 18:25
  • 1
    @aradarbel10 Do you know the solution? Or are you just posting half-baked thoughts? I'm pretty sure that doesn't do much for you. (And OP already wrote that OP knows that) – Rushabh Mehta Jan 17 '20 at 18:26
  • If $a=1,$ $b=-1,$ then $a^2+b^2+ab=1$ is a square. – Thomas Andrews Jan 17 '20 at 18:31
  • @ThomasAndrews But $3$ isn't a perfect square? – Maximilian Janisch Jan 17 '20 at 18:31
  • Sorry, I meant for the case $a^2+b^2-ab.$ @MaximilianJanisch But the case $a=1,b=-1$ gives a square in the first case. – Thomas Andrews Jan 17 '20 at 18:32
  • 3
    @ThomasAndrews I think he wants us to prove that there are no numbers $a,b$ such that both $a^2+ab+b^2$ and $a^2-ab+b^2$ are perfect squares. Otherwise consider for example $$a=4k+2,b=6k^2+4k, a^2+ab+b^2=(6k^2+6k+2)^2$$ (admittedly the wording is confusing) – Maximilian Janisch Jan 17 '20 at 18:34
  • Ah, that would make more sense, yes. @MaximilianJanisch – Thomas Andrews Jan 17 '20 at 18:37
  • Is that correct, you want to prove that at least one of $a^2+b^2\pm ab$ is not a square? – Thomas Andrews Jan 17 '20 at 18:38
  • @MaximilianJanisch your choice of $a,b$ are not coprime. $2|(4k+2)$ and $2|(6k^2+4k)$. – SlipEternal Jan 17 '20 at 18:39
  • @InterstellarProbe You are right – Maximilian Janisch Jan 17 '20 at 18:39
  • @ThomasAndrews My example was wrong – Maximilian Janisch Jan 17 '20 at 18:40
  • 1
    We have, for example, $(a,b)=(8,15)$ gives $a^2+b^2-ab=13^2.$ – Thomas Andrews Jan 17 '20 at 18:41
  • To be clear, I want to prove that neither $^2+^2+$ nor $^2+^2−$ can be a perfect squares and my apologies for not originally stating that $a, b$ are both positive and distict integers – stevepuzzled Jan 17 '20 at 18:45
  • 2
    @MaximilianJanisch You can instead use $(a,b)=(2k+1,3k^2+2k)$ yielding $a^2+b^2+ab=(3k^2+3k+1)^2.$ – Thomas Andrews Jan 17 '20 at 18:46
  • 4
    But then answer, $(a,b)=(8,15)$ gives $a^2+b^2-ab=13^2,$ which contradicts your question. @stevepuzzled – Thomas Andrews Jan 17 '20 at 18:47
  • Thank you Thomas Andrews, you are correct. I'll have to go back to the drawing board, it seems – stevepuzzled Jan 17 '20 at 18:51
  • 1
    In the case $(a,b)=(2k+1,3k^2+2k)$ you have $(6k+1)a-4b=(6k+1)(2k+1)-4(3k^2+2k)=1.$ so that gives an infinite set. – Thomas Andrews Jan 17 '20 at 19:00
  • For satisfying both $a^2+ab+b^2=x^2,a^2-ab+b^2=y^2$, $\gcd(a,b)=1$ means $a,b$ odd so considering modulo $4$ will show that it's impossible for all $a,b\in\mathbb Z$. – Yong Hao Ng Jan 17 '20 at 19:13
  • There are infinitely many cases where $b=a+1$ and $a^2+b^2+ab$ is a perfect square. Solve the Pell-like equation $x^2-3y^2=1$ where $x$ is even and hence $y$ is odd. Then $(a,b)=\left(\frac{y-1}{2},\frac{y+1}2\right)$ gives $\left(\frac{x}{2}\right)^2.$ The smallest is $(7,8).$ – Thomas Andrews Jan 17 '20 at 19:16
  • All your answers have been very helpful and have shown me that I need to do quite a lot more work on the larger proof of which I thought this was an essential element. The problem has arisen because I was expecting $b$ to remain the middle-length side of a scalene triangle, whereas the solution results from b having become the longest side.Thanks to everybody for your time and speedy response to my question. – stevepuzzled Jan 17 '20 at 19:24
  • 1
    It can be shown that for coprime integers $a,b$, $a^2+ab+b^2$ is a perfect square iff there are coprime integers $x,y$ s.t. (i) $x\not\equiv y\pmod{3}$ and $(a,b)=(x^2-y^2,2xy+y^2)$, or (ii) $x\not\equiv -y\pmod{3}$ and $(a,b)=(x^2-y^2,2xy-x^2)$. $$ \phantom{aa}$$ On the other hand, for coprime integers $a,b$, $a^2-ab+b^2$ is a perfect square iff there are coprime integers $x,y$ either (i) $x\not\equiv -y\pmod{3}$ and $(a,b)=(x^2-y^2,2xy-y^2)$, (ii) $x\not\equiv y\pmod{3}$ and $(a,b)=(x^2-y^2,2xy+x^2)$. – Batominovski Jan 17 '20 at 20:25
  • 1
    I don't think my earlier comment helps much. However, if I'm not mistaken, this problem is equivalent to showing that for a rational number $k$, the cubic polynomial $u^3+4ku^2+(3k^2-1)u-4k$ has a rational root if and only if $k=0$. This is also equivalent to showing that $(u^2-1)(v^2-1)=-3$ has a solution where $u$ and $v$ are rational numbers if and only if $u=0$ or $v=0$. – Batominovski Jan 17 '20 at 20:27
  • 1
    To be clear, in my comment immediately above this one, I assumed that the problem is to show that there do not exist coprime integers $a$ and $b$, both are non-zero, such that $a^2+ab+b^2$ and $a^2-ab+b^2$ are *both* perfect squares of integers. (As pointed out by other comments including mine, there are infinitely many counterexamples if you just want one of $a^2+ab+b^2$ and $a^2-ab+b^2$ to be a perfect square.) – Batominovski Jan 17 '20 at 20:56
  • This link about five squares in arithmetic progression claims that, using quadratic forms, the disproof of the existence of such squares is straightforward. (about a quarter of the way down the page, starting at "Another interesting question is whether four of five...") – David Diaz Jan 17 '20 at 22:43
  • I don't fully understand the quadratic form transformations, else I would have posted as an answer. Maybe someone else can flesh it out a bit. – David Diaz Jan 17 '20 at 23:57

0 Answers0