2
$\begingroup$

How many triangles are possible with positive integer side lengths for perimeter $n$?

My attempt so far has been bashing for $n=1,\; 2, \cdots , 13$ and calculating how many triangles are possible for those specific $n$'s. I found a pattern for when $n$ is odd or even, but haven't really been able to do much more than that.

I think I it would be useful to assume for a triangle $\left ( a,b,c\right )$ that $$ a \leq b \leq c$$ to avoid over counting.

$\endgroup$
  • 1
    $\begingroup$ Hint: Assuming $a \leq b \leq c$, a triangle of side lengths $(a,b,c)$ exists iff $a+b \geq c$. $\endgroup$ – JoeyBF Jun 13 '14 at 14:42
  • 1
    $\begingroup$ Excluding flat triangles and using your convention, all triples such that $a+b>c$ are possible. With $a+b+c=n$, this gives $2(a+b)>n$. $\endgroup$ – Yves Daoust Jun 13 '14 at 14:43
3
$\begingroup$

HINT: Let $a,b,c$ denote the lengths of the sides of the triangle. Then we should have $$a+b>c\quad\mbox{and}\quad a+b+c=n.$$ The above two equations implies $a+b-c=n-2c>0$, i.e. $c<n/2$ and similarly $a,b<n/2$. So you need to count the number of triples $(a,b,c)$ such that $0<a\leq b\leq c$ and $a,b,c<n/2$.

EDIT: Note that you only need to find the number of tuples $(a,b)$ such that $0<a\leq b$ and $a,b<n/2$, because $c$ is fixed once you specify $a$ and $b$. Let us consider two cases.

Case (i) $n$ is even: For a fixed $a$, you have the following choices for $b$: $a+1, a+2,\cdots ,n/2-1$, that is $n/2-1-a$ choices. Now $a$ can take values $1,2,\ldots ,n/2-1$. So the number of triangles in this case is $$\sum_{a=1}^{n/2-1}(n/2-1-a)=(n/2-2)+(n/2-3)+\cdots +1=\frac{(n/2-2)(n/2-1)}{2}.$$

Case (ii) $n$ is odd: For a fixed $a$, you have the following choices for $b$: $a+1, a+2,\cdots ,(n-1)/2$, that is $(n-1)/2-a$ choices. Now $a$ can take values $1,2,\ldots ,(n-1)/2$. So the number of triangles in this case is $$\sum_{a=1}^{(n-1)/2}((n-1)/2-a)=((n-1)/2-1)+\cdots +1=\frac{((n-1)/2-1)(n-1)/2}{2}.$$

$\endgroup$
  • $\begingroup$ excluding 0. You would want to add that :) $\endgroup$ – tpb261 Jun 13 '14 at 14:57
  • $\begingroup$ I think that should be obvious, length of a line segment can not be $0$; anyway, specified. $\endgroup$ – pritam Jun 13 '14 at 15:04
  • $\begingroup$ Obvious, yes. But it's easy to miss while forming the expressions, at least to me. $\endgroup$ – tpb261 Jun 13 '14 at 15:05
  • $\begingroup$ @pritam I still haven't been able to fully solve it. Do you mind showing the solution? I'm apparently supposed to arrive at Alcuin's Sequence, but i'm not sure how I would have ever formed that sequence myself. $\endgroup$ – Ozera Jun 13 '14 at 16:01
  • 1
    $\begingroup$ @Ozera: I have completed the answer, have a look. $\endgroup$ – pritam Jun 14 '14 at 16:56
2
$\begingroup$

A bit of looking up gives the sequence A005044

Also, this paper might be of interest.

$\endgroup$
  • $\begingroup$ A few more references for alucin's sequence: 1. A simple closed form by elementary means 2. Triangles with Integer Sides and Sharing Barrels $\endgroup$ – talegari Jun 13 '14 at 17:13
  • $\begingroup$ Thanks for the references. $\endgroup$ – gar Jun 13 '14 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.