Olympiad Maths Prep

Track / Stage 5 / 74 of 400 #674 of 2000

Problem 674

AIME late
Combinatorics Difficulty 5.2 Find the answer

25. Determine the number of non-congruent triangles with positive integer side lengths and a perimeter of nn.

Try to determine the number of non-congruent triangles with positive integer side lengths and a perimeter of nn.

Official solution

25. The side lengths of a triangle with integer sides and perimeter nn

Let the side lengths be represented by x,y,zx, y, z, then
x+y+z=nx+y+z=n,
x>0,y>0,2x>yx>0, y>0, 2x>y.

The integer solutions for xx are given by y=n2xy=n-2x, thus
n4<x<n2\frac{n}{4}<x<\frac{n}{2}.

Therefore, the integer solutions for xx are [n12][n4]\left[\frac{n-1}{2}\right]-\left[\frac{n}{4}\right], i.e.,
x=[n4]+1,[n4]+2,,[n12]x=\left[\frac{n}{4}\right]+1,\left[\frac{n}{4}\right]+2, \cdots,\left[\frac{n-1}{2}\right].
Hence, I=[n12][n4]I=\left[\frac{n-1}{2}\right]-\left[\frac{n}{4}\right].
Now, let's find TT, with n=12q+r,0r11n=12q+r, 0 \leqslant r \leqslant 11.
If r=0r=0, then
N=n26n+88N=\frac{n^{2}-6n+8}{8},
I=n21n4=n44I=\frac{n}{2}-1-\frac{n}{4}=\frac{n-4}{4},
E=1E=1,
T=n26n48+8+n48+13T=\frac{n^{2}-6n}{48}+8+\frac{n-4}{8}+\frac{1}{3}
=n248=\frac{n^{2}}{48}.
If r=1r=1, then
N=n218N=-\frac{n^{2}-1}{8},
I=n12n14=n14I=\frac{n-1}{2}-\frac{n-1}{4}=\frac{n-1}{4},
E=0E=0,
T=n2148+n18T=\frac{n^{2}-1}{48}+\frac{n-1}{8}
=n2+6n748=\frac{n^{2}+6n-7}{48}.
Similarly, we can obtain
If r=2,3,4,5,6,7,8,9,10,11r=2,3,4,5,6,7,8,9,10,11,
then T=n2448,n2+6n+2148T=\frac{n^{2}-4}{48}, \frac{n^{2}+6n+21}{48},
n21648,n2+6n748\frac{n^{2}-16}{48}, \frac{n^{2}+6n-7}{48},
n2+1248,n2+6n+548\frac{n^{2}+12}{48}, \frac{n^{2}+6n+5}{48}
n21648,n2+6n+948-\frac{n^{2}-16}{48}, \frac{n^{2}+6n+9}{48},
n2448,n2+6n+548\frac{n^{2}-4}{48}, \frac{n^{2}+6n+5}{48} \cdots.
In summary, we have
When nn is odd, T=N(n2+6n48)T=N\left(\frac{n^{2}+6n}{48}\right);
When nn is even,
T=N(n248)T=N\left(\frac{n^{2}}{48}\right).

Where N(x)N(x) represents the integer closest to xx, for example.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.