# Largest integer $n$ such that $3^n$ divides every $abc$ with $a$, $b$, $c$ positive integers, $a^2+b^2=c^2$, and $3|c$

Let $P$ denote the set { $abc$ : $a$, $b$, $c$ positive integers, $a^2+b^2=c^2$, and $3|c$}. What is the largest integer $n$ such that $3^n$ divides every element of $P$?

I first saw that as $3|c\implies c=3k$ where $k\in \mathbb{N}$

$\implies a^2+b^2=9k^2$

Now this means $a^2\equiv r1(mod \space 9)$ & $b^2\equiv r2(mod \space 9)$

where $r1+r2=9k_1$ where $k_1\in \mathbb{N}$

In order to get the largest integer $n$ s.t $3^n|\space \text{every element of P}$

We have to assume $a=3k$ and $b=3k$

Thus $abc=3^3\times(some \space number \ne a \space multiple \space \space of \space 3)$

Thus $n \space should \space be =3$

But the answer here is 4

P.S. Is there any geometrical angle in this problem meaning can this $a^2+b^2=c^2$ be considered a circle somehow and proceed? I can't think of that approach.

OK here we have a solution, lets look at it:

As @ChristianF suggested as an answer to another of my question,

Lemma: If $a^2+b^2=c^2$ then at least one of integers $a,b,c$ is divisible by $3$.

Proof: If $3\mid c$ we are done. Say $3$ doesn't divide $c$. Then $$a^2+b^2\equiv 1 \pmod 3$$

So if $3$ doesn't divide none of $a$ and $b$ we have $$2\equiv 1 \pmod 3$$ a contradiction.

Also suggested by @Christian Blatter

Modulo $3$ only $0$ and $1$ are squares, hence $x^2+y^2=0$ mod $3$ implies $x=y=0$ mod $3$. It follows that all three of $a$, $b$, $c$ are divisible by $3$. Canceling this common factor we obtain $a'^2+b'^2=c'^2$ which is only possible if at least one of $a'$, $b'$, $c'$ is $=0$ mod $3$.

We will follow along the lines:

If $3|c \implies c=3k$ for some $k \in \mathbb{N}$

Now this means according to @Christian Blatter,Modulo $3$ only $0$ and $1$ are squares, hence $x^2+y^2=0$ mod $3$ implies $x=y=0$ mod $3$. It follows that all three of $a$, $b$, $c$ are divisible by $3$.

Hence $a=3k_1,b=3k_2$ for some $k_1,k_2 \in \mathbb{N}$

Now we get $9k_1^2+9k_2^2=9k^2$

Cancelling the 9 from the above from LHS and RHS we get

$k_1^2+k_2^2=k^2$

which is analogous to the fact that

we obtain $a'^2+b'^2=c'^2$ which is only possible if at least one of $a'$, $b'$, $c'$ is $=0$ mod $3$

Thus one of $k_1,k_2$ is still a multiple of 3

$\implies$ $a\times b \times c= 3^4 \times K$

Hence for $n=4$, which is the largest integer, $3^n|a\times b \times c$

Thanks to @ChristianF and @Christian Blatter for the insight

• Excellent breakdown and analysis! Commented May 4, 2022 at 17:03

First, convince yourself that every solution of $a^2+b^2=c^2$ has $abc$ a multiple of 3.
Then convince yourself that every solution with $c$ a multiple of 3 must be such that $(a/3)^2+(b/3)^2=(c/3)^2$ with $a,b,c$ all integers (I think you've already done this, so the first sentence above is all you really need).
• Yes indeed but how do I say that for $n=4$(which is the largest n ), $3^n | abc$ ? That is my problem. I can see that $3^3| \text{ every }abc$ but how $3^4$? Cause the answer is $n=4 \text{ not } 3$. The point is, you see, we have to show that $a=3k,b=3k,c=3^2\times k$ for some $k \in \mathbb{N}$.Then only you get $3^4$ here. Am I wrong at my conjecture? Commented Apr 22, 2018 at 7:21