proof: primitive pythagorean triple, a or b has to be divisible by 3 I'm reading "A friendly introduction to number theory" and I'm stuck in this exercise, I'm mentioning this because what I need is a basic answer, all I know about primitive pythagorean triplets is they satisfy $a^2 + b^2 = c^2$ and a, b and c has no common factors.
Now.. my approach (probably kind of silly) was to "classify" the odd numbers (not divisible by 3) as $6k+1$, $6k+2$ and $6k+5$, and the even numbers with $6k+2$ and $6k+4$, then, trying different combinations of that, I could probe all the cases when I assume c is not 3 divisible, but I still have to probe that c cannot be 3 divisible and I don't know how to do it.
Anyway, probably there is a better simpler solution.
(Sorry, if this is a stupid question, I'm trying to teach myself number theory without much math background)

I'm reading the book too. I came up with a different approach. Of course, it is not as elegant as the answer given, but here goes.
$$
a = st
$$
$$
b = (s^2 - t^2)/2
$$
Choose values for s and t.
If either of s or t is a multiple of 3, then $ a = st $ is a multiple of 3. Both s and t cannot be multiples of 3, as that will cause both a and b to be multiples of 3 and the triplet won't be primitive.
If neither s nor t is a multiple of 3.
$$
s = 3x + y
$$
$$
t = 3p + q
$$
Here y and q can take values 1 and 2.
a cannot be a multiple of 3. Simplifying b, we get
$$
b = (s - t)(s + t)/2
$$
$$
b = (3x - 3p + y - q)(3x + 3p + y + q)/2
$$
Now y and q can either be 1 or 2.
When y and q are both equal to 1 or 2, the first term becomes $(3x - 3p)$.
When y and q are unequal, but take the values 1 or 2, the second term becomes $(3x + 3p + 3)$.
In both cases, b is a multiple of 3.
