3

After a lot of messing around today I curiously observed that $a^2+b^2$ is only divisible by 3 when both $a$ and $b$ contain factors of 3. I am trying to prove it without using modular arithmetic (because that would be way too easy), but finding it very difficult to do so. Is there an easy way to prove this without using modular arithmetic?

I am also interested in a more general statement. Namely, I want to find the values of $Z$ for which $Z \mid \left( a^2+b^2 \right)$ necessarily implies that $Z \mid \gcd \left( a,b\right)$. We know that $Z$ cannot be 5, because $3^2+4^2=5^2$. More generally, if $Z$ is the largest element of a pythagorean triple then the above implication does not hold.

Ryan
  • 1,389
  • 2
    Why would you want to avoid modular arithmetic? Some tools are meant to be used, they are irreplaceable. – Pedro Sep 01 '13 at 03:49
  • It is my opinion that modular arithmetic is a non-intuitive tool which often draws attention away from the actual inner-workings of a proof. A good analogy is finding a general expression for a sequence by using a "characteristic polynomial." While such a proof is logically valid, it is also non-direct and not very intuitive to the casual mathematician. – Ryan Sep 01 '13 at 04:20

4 Answers4

4

Hint Compute $a^2+b^2$ modulo $3$ when $a,b$ vary through $0,1,2$. In fact, it suffices you look only at $(1,2),(1,1),(1,0)$, by symmetry.

If I recall correctly: let $p$ be an odd prime. Consider the expression $$f(x,y)=Ax^2+Bxy+Cy^2$$ where $A,B,C$ are integers. Let $\Delta=B^2-4AC$, and suppose $\left(\dfrac{\Delta}{p}\right)=-1$. Then $f(x,y)=0\mod p$ implies $x=y=0\mod p$.

P First, $A=0$ or $C=0$ means $\Delta$ is a q.r. modulo $p$; so $A,C\neq 0$. As $p$ is an odd prime, and $p\not\mid A$, $f(x,y)=0\iff 4Af(x,y)=0$, thus $$(2Ax+By)^2-\Delta y^2=0$$ If $y\neq 0$ then we would get $$\left(\frac{2Ax}y+B\right)^2=\Delta\mod p$$ which is impossible. But then $y=0$ gives $x=0$.

In your case, $\Delta=-4\equiv 2$, so the theorem holds since $\mod 3$ every nonzero is $=1$ upon squaring.

Pedro
  • 122,002
  • @vadim123 Ugh. What's the fun in that? – Pedro Sep 01 '13 at 03:35
  • 1
    Peter, yes, $\Delta = b^2 - 4 a c,$ same as in the quadratic formula. Given an odd prime $q$ with Jacobi $(\Delta | q) = -1,$ the property asked about holds. 2 and primes dividing $\Delta$ need separate consideration. – Will Jagy Sep 01 '13 at 03:40
  • 1
    @WillJagy Added a not so old lesson. =) – Pedro Sep 01 '13 at 03:46
  • Peter, I would emphasize that $p$ does not divide $\Delta,$ that should fit just after you say "is not a quadratic residue modulo $p$" – Will Jagy Sep 01 '13 at 03:51
  • Because you are not using the Legendre symbol; I would be unsure about whether 0 is a quadratic residue, so this is for clarification. I like to put in details when I suspect that usage varies a bit from author to author. Note that the theorem does not work properly if $p | \Delta.$ – Will Jagy Sep 01 '13 at 03:57
  • 1
    @WillJagy Oh, yes. OK. I had used the Legendre symbol in my notes, now that I see. – Pedro Sep 01 '13 at 03:58
3

For your second question, $Z$ can be any prime $q \equiv 3 \pmod 4,$ or the product of distinct such primes.

Will Jagy
  • 139,541
1

If $3\not|(a,b)$

let $a=3A\pm1$ and $b=3B\pm1$ where $A,B$ are any integers

Clearly, there are $4$ combinations $(+,+),(+,-),(-,+),(-,-)$

but we do not to deal case by case as follows:

$a^2+b^2=9A^2\pm6A+1+9B^2\pm6B+1\equiv2\pmod3\not\equiv0$

Using modular arithmetic,

if $3\not|(a,b),$

$a\equiv\pm1\pmod3$ and $b\equiv\pm1\pmod3$

$\implies a^2+b^2\equiv1+1\pmod3\not\equiv0$

-1

Given that 3 is a factor of A and of B. If 3 is a factor of A then A is a multiple of 3, say A = 3k, k an integer.Then A²=9k² Analoguously for B² = 9m² So A²+B² = 9k²+9m²=9(k²+m²) and 3 is a factor of 9, k²+m² is another integer. I think I am seriously overlooking something here? It can't be that easy...

imranfat
  • 10,029
  • This direction is easy, it is the other one, which is more difficult. – Tomas Sep 01 '13 at 03:43
  • Hmmm, I am afraid you could be right about that... – imranfat Sep 01 '13 at 03:45
  • $3|\gcd (a, b) \implies 3 | a$ and $3|b \implies 3 | (a^2+b^2)$ doesn't look difficult. In fact the difficult part seems to show is that $3 | (a^2+b^2) \implies 3|a$ and $3|b$ without any mod arithmetic. – Macavity Sep 01 '13 at 04:14