Number of integer triangles with sides 4 or less

153 Views Asked by At

Consider triangles having integer sides such that no side is greater than 4 units. How many such triangles are possible?

I suspect a relation to the following question:

How many ways can $r$ things be taken from $n$ with repetition and without regard to order?

2

There are 2 best solutions below

0
On BEST ANSWER

Without loss of generality, assume that $a \leq b \leq c < a+b$. This leaves us with very few choices.

1) All three could be equal. That gives us four choices.

2) $a=1$. Then, $b+1 > c$, so $b=c$ must happen, this gives three choices.

3) $a=2$. Then, $b \leq c < b+2$, so $b=2$,$c=3$ and $b=3, c=3,4$ , and $b=c=4$ are the possibilities.

4) $a=3$, then $b=3,c=4$ and $b=c=4$ are the only possibilities.

Hence, the total is $4+3+4+2 = 13$ possibilities.

0
On

In general, the number $a(n)$ of triangles with positive integer side-lengths of at most $n$ can be computed recursively by $a(n) = a(n-2) + {n+1 \choose 2}$. See OEIS sequence A2623 for more info.

Clearly $a(0)=0$. Then $a(2) = a(0) + {3 \choose 2} = 3$ and $a(4) = a(2) + {5 \choose 2} = 13$. See астон's answer for a case analysis that gives you $13$.