pythag[n_]:=Block[{soln=Solve[{a^2+b^2==c^2,a+b+c<=n,0