Consider the triangles with integer sides $a$, $b$ and $c$ with $a \leq b \leq c$. An integer sided triangle $(a,b,c)$ is called primitive if $gcd(a,b,c)=1$. How many primitive integer sided triangles exist with a perimeter not exceeding $10 000 000$?
I am trying to solve this on euler project. I am wondering what is the best way to go to find the valid triples for constructing a triangle. Of course you can do nested for loops but that is not efficient. Any pointers would help.
Thanks