# I got an interesting resut

1. Apr 28, 2007

### daniel_i_l

Is there any significance to all this or is it just silly number games?
Thanks.

2. Apr 28, 2007

### Werg22

I really can't see what you mean...

3. Apr 28, 2007

### daniel_i_l

The general idea is just to find triangles with sides of integer length where the sum of the sides is some number. The "number" is the number of links. So for the number three, the only triangle is (1,1,1) cause the only three integers whose sum is 3 is 1+1+1. For 9 you get the 3 results posted above... Is that what you where asking?

4. Apr 28, 2007

### LukeD

Oh wow, that's really interesting. I can't think of any use, but I'm sure that it has a lot of implications for discrete math in general.

5. Apr 29, 2007

### AKG

3 numbers x, y, z form a chain that can be made into a triangle of perimeter n iff x+y+z = n and max{x,y,z} < [n/2] where [.] is the "round down" function. The reason for the condition "x+y+z = n" is obvious. The second condition basically says that the triangle inequality is satisfied. So given an n, how many (x,y,z) satisfy this? To count this, condition on the size of the smallest side, which has length k anywhere between 1 and [n/3]. So the remaining two sides have to add up to n-k, and both must have length greater than or equal to k, and less than or equal to [n/2]. The next smallest side has length m, so we need [n/2] > m > k, [n/2] > n-(m+k) > m, since n-(m+k) will be the length of the largest side. So this means:

max{n-k-[n/2], k} < m < min{[n/2], [(n-k)/2]}

which is just

max{n-k-[n/2], k} < m < [(n-k)/2]

For each m satisfying the above, we get one and only one possibility, so we just have to count the number of m satisfying this, and that is exactly

[(n-k)/2] - max{n-k-[n/2], k}

So the total number of triangles of perimeter n and integer length sides is:

$$\sum _{k=1} ^{\lfloor n/3 \rfloor}\left \lfloor \frac{n-k}{2} \right \rfloor - \max \left (n-k-\left \lfloor \frac{n}{2} \right \rfloor ,\, k\right )$$

When is n-k-[n/2] > k? When k < [{n/2}/2], where {.} is the round up function. So the above sum is:

$$\sum _{k=1} ^{\lfloor \lceil (n/2) \rceil /2 \rfloor}\left \lfloor \frac{n-k}{2} \right \rfloor - \left (n-k-\left \lfloor \frac{n}{2} \right \rfloor \right ) + \sum _{k=\lfloor \lceil (n/2) \rceil /2 \rfloor + 1} ^{\lfloor n/3 \rfloor}\left \lfloor \frac{n-k}{2} \right \rfloor - k$$

$$= -\left \lfloor \frac{\lceil n/2 \rceil}{2} \right \rfloor \left \lceil \frac{n}{2} \right \rceil + \sum _{k=1} ^{\lfloor \lceil (n/2) \rceil /2 \rfloor}\left \lfloor \frac{n-k}{2} \right \rfloor + k + \sum _{k=\lfloor \lceil (n/2) \rceil /2 \rfloor + 1} ^{\lfloor n/3 \rfloor}\left \lfloor \frac{n-k}{2} \right \rfloor - k$$

$$= -\left \lfloor \frac{\lceil n/2 \rceil}{2} \right \rfloor \left \lceil \frac{n}{2} \right \rceil + \left \lfloor \frac{\lceil n/2 \rceil}{2}\right \rfloor ^ 2 + \left \lfloor \frac{\lceil n/2 \rceil}{2} \right \rfloor - \frac{1}{2} \left ( \left \lfloor \frac{n}{3}\right \rfloor ^ 2 + \left \lfloor \frac{n}{3} \right \rfloor \right ) + \sum _{k=1} ^{\lfloor n/3 \rfloor}\left \lfloor \frac{n-k}{2} \right \rfloor$$

Last edited: Apr 29, 2007
6. Apr 29, 2007

### AKG

Actually, figure out this number for the first, say, 8 n. You get 0, 0, 1, 0, 1, 1, 2, 1. Go to http://www.research.att.com/~njas/sequences/index.html [Broken], type in that sequence of numbers, and hit "Search". You'll see your sequence has already been discovered, it's called Alcuin's sequence, and a formula much better than mine is already given for it. It's actually 12 different formulas because it depends on the value of n (mod 12). From that site:

For n=0..11 (mod 12), a(n) is respectively
n^2/48
(n^2 + 6n - 7)/48
(n^2 - 4)/48
(n^2 + 6n + 21)/48
(n^2 - 16)/48
(n^2 + 6n - 7)/48
(n^2 + 12)/48
(n^2 + 6n + 5)/48
(n^2 - 16)/48
(n^2 + 6n + 9)/48
(n^2 - 4)/48
(n^2 + 6n + 5)/48

48 certainly does have some significance! By the way, something went wrong in the formula I derived, because when I plug in n=48 I get 52 as the result (unless I just computed wrong).

Last edited by a moderator: May 2, 2017