How many triangles are there whose sides are integers not greater than a given $n$?
First, let's calculate the number of triangles where the longest side \( k \leq n \). Let the length of the second largest side of the triangles be \( l \), and the smallest side be \( m \). If \( k \) is even, then - taking into account the triangle inequality - the possible values of \( l \) are \( k / 2 + 1, k / 2 + 2, \ldots, k \), while for \( m \), given these values of \( l \), there are \( 2, 4, \ldots, k \) possibilities. Thus, the number of triangles is

\[
2 + 4 + \ldots + k = \frac{(k+1)^2}{4} - \frac{1}{4}
\]

If \( k \) is odd, then the possible values of \( l \) are \( (k+1) / 2, (k+3) / 2, \ldots, k \); for \( m \), there are \( 1, 3, 5, \ldots, k \) possibilities respectively. Thus, the number of triangles is

\[
1 + 3 + 5 + \ldots + k = \frac{(k+1)^2}{4}
\]

Now we can determine the number of triangles with side lengths at most \( n \). We need to sum the quarter of the square numbers from 2 to \( (n+1) \), and subtract \( 1/4 \) for each even number up to \( n \). According to the well-known formula for the sum of square numbers, the number of triangles is thus

\[
\frac{1}{4}\left(\frac{(n+1)(n+2)(2n+3)}{6} - 1\right) - \frac{1}{4}\left[\frac{n}{2}\right]
\]

We can also express our result in another form: if \( n \) is even, then the above expression is

\[
\frac{(n+1)(n+2)(2n+3) - 6}{24} - \frac{n}{8} = \frac{2n^3 + 9n^2 + 10n}{24}
\]

while, if \( n \) is odd, then

\[
\frac{(n+1)(n+2)(2n+3) - 6}{24} - \frac{n-1}{8} = \frac{2n^3 + 9n^2 + 10n + 3}{24}
\]

Summarizing in one formula, the number of non-congruent triangles is

\[
\left[\frac{2n^3 + 9n^2 + 10n + 3}{24}\right] = \left[\frac{(n+1)(n+3)(2n+1)}{24}\right]
\]