The important fact here is that in a triangle with sides , it must be true that and
The last two inequalities are obvious given that , so we just need to see how many ways we can choose and so that
Suppose is even.
Then if , then must equal .
if , then can equal or .
if , then b can equal .
(So far we have ways to choose and .
Doing the same thing when , we find that there are more ways to choose, giving a total of triangles.
The other cases of this problem are not much different.