I have been trying to find a formula to find the number of right angled triangles where all the sides are integers and the perimeter is given. I have seen the formula x**3/((1-x**2)*(1-x**3)***(1-x4)), but that gives me the amount of possible triangles with that perimeter, not the amount of right - angled triangles. Does anyone know any formulas to find the amount of right angled, integer triangles of a given perimeter? Thanks in advance!