# perfect right-triangles that are not super-perfect

I'm seeking some insight on the answer to this problem from Project Euler.

Consider the right angled triangle with sides $$a=7, b=24$$, and $$c=25$$.

The area of this triangle is $$84$$, which is divisible by the perfect numbers $$6$$ and $$28$$.

Moreover, it is a primitive right angled triangle as gcd$$(a,b)=1$$ and gcd$$(b,c)=1$$.

Also, c is a perfect square.

We will call a right angled triangle perfect if

1. it is a primitive right angled triangle
2. its hypotenuse is a perfect square


We will call a right angled triangle super-perfect if

1. it is a perfect right angled triangle and
2. its area is a multiple of the perfect numbers 6 and 28


How many perfect right-angled triangles with $$c \le n$$ exist that are not super-perfect?

The answer turns out to be 0.

This outcome is not immediately intuitive to me.

Is there some property of Pythagorean triples that leads to this conclusion?

For the given case, it is evident that the area is a multiple of the perfect numbers 6 and 28, so we see that this perfect right-angled triangle is super-perfect, but how can we generalize this property for all perfect right-angled triangles?

Any insight is much appreciated. Thanks

If the primitive right triangle has generators $$m$$ and $$n$$, with legs $$2mn$$ and $$m^2-n^2$$ and hypotenuse $$m^2+n^2$$, then $$m^2+n^2 = k^2$$, and $$(m,n)=1$$ since the original triangle is primitive. This defines a new right triangle, which must have generators $$p, q$$: $$m = 2pq,\quad n = p^2-q^2,\quad k = p^2+q^2.$$ Then the area of the original triangle is $$2mn(m^2-n^2) = 2pq(p^2-q^2)(4p^2q^2-(p^2-q^2)^2.$$ Since $$(p,q)=1$$, we have $$p^2-q^2\equiv 0\mod{2}$$, so the area is divisible by 4. Also, either one of $$p$$ and $$q$$ is divisible by $$3$$, so the area is divisible by $$6$$. Finally, if neither $$p$$ nor $$q$$ is divisible by 7, it's not hard to see that $$4p^2q^2-(p^2-q^2)^2$$ is, using the fact that $$p^2, q^2\equiv 1, 2, 4\mod{7}$$.