Can all numbers $a, b, c$ that $a^2+b^2=c^2$ be sides of a right triangle? ($c$ is the hypotenuse) I saw this problem:
Find the number of right triangles that the hypotenuse and one side are both prime numbers.
I said that we don't have any property about the other side, so we can assume it is a real number and not only natural. Thus the sides would be $$p, \sqrt{q^2-p^2}, q $$ Where p and q are primes and q is the hypotenuse, and as result there exists infinte number of triangles of this type.
But what I am not sure about is that all these triples could be sides of a right triangle or not (being correct in triangle inequality). $$p<\sqrt{q^2-p^2}+q$$ And for other sides. Can all numbers all numbers in this form be sides of a right triangle or not (why)?
Yes, if three side lengths satisfy the Pythagorean theorem, then they satisfy the triangle inequalities.
Proof: if $a^2+b^2=c^2$ and all letters denote positive numbers, $$a+b=\sqrt{(a+b)^2}=\sqrt{a^2+2ab+b^2}=\sqrt{c^2+2ab}>\sqrt{c^2}=c$$
Similarly
$$a+c=\sqrt{(a+c)^2}=\sqrt{a^2+2ac+c^2}=\sqrt{2a^2+2ac+b^2}>\sqrt{b^2}=b$$