11. (CZS 5) Let $n$ be a positive integer. Find the maximal number of noncongruent triangles whose side lengths are integers less than or equal to n.
11. We have to find the number $p_{n}$ of triples of positive integers $(a, b, c)$ satisfying $a \leq b \leq c \leq n$ and $a+b>c$ Let us denote by $p_{n}(k)$ the number of such triples with $c=k, k=1,2, \ldots, n$. For $k$ even, $p_{n}(k)=k+(k-2)+(k-4)+\cdots+2=\left(k^{2}+2 k\right) / 4$, and for $k$ odd, $p_{n}(k)=\left(k^{2}+2 k+1\right) / 4$. Hence
$$
p_{n}=p_{n}(1)+p_{n}(2)+\cdots+p_{n}(n)=\left\{\begin{array}{ll}
n(n+2)(2 n+5) / 24, & \text { for } 2 \mid n, \\
(n+1)(n+3)(2 n+1) / 24, & \text { for } 2 \nmid n
\end{array}\right.
$$