Computing the number of Triangles We Can Make

Recap:  Recall that if we know C and B, that there are 2B-1-C values that A can be.

Also, remember that B can range only from (C/2)+1 to C-1 for even values of C
and from (C/2)+1/2 to C-1 for odd values of C.

Therefore, our formula is to compute the sum of 2B-1-C for every value of C and from 3 to 50 and correspondingly, every value of B using the range described above.

The result is 9,500 ways to make a triangle.

The formula I used looks like this:

triangle formula

I worked a great deal on this problem with my husband, Zac and he was able to get the same answer using a similar method.  His method is worth taking a look at because it is simpler and also mine still has some glitches.

Zac's Solution