Example 2.3.4 There are 2005 points in space, no three of which are collinear. Divide them into 30 groups with different numbers of points. For any three different groups, take one point from each as the vertex to form a triangle. To maximize the number of such triangles, how many points should be in each group?
Solution: Divide 2005 points into 30 groups with different numbers of points, let the number of points in each group be $n_{1}$, $n_{2}, \cdots, n_{30}$, without loss of generality, assume
$$
1 \leqslant n_{1} < n_{2} < \cdots < n_{30}.
$$
If $n_{i+1}-n_{i}>2$ for some $i \geqslant 2$, without loss of generality, assume $n_{2}-n_{1}>2$, then adjust $n_{1}, n_{2}$ to $n_{1}^{\prime}=n_{1}+1, n_{2}^{\prime}=n_{2}-1$, after adjustment $\sum_{i=1}^{30} n_{i}$ remains unchanged, while $\left(n_{1}+1\right)\left(n_{2}-1\right)>n_{1} n_{2}$. The total number of triangles is
$$
\sum_{1 \leqslant i<j<k \leqslant 30} n_{i} n_{j} n_{k}=\sum_{3 \leqslant i<j<k \leqslant 30} n_{i} n_{j} n_{k}+\left(n_{1}+n_{2}\right) \sum_{3 \leqslant j<k \leqslant 30} n_{j} n_{k}+n_{1} n_{2} \sum_{k=3}^{30} n_{k} .
$$

After adjustment, the first and second summations remain unchanged, the third summation increases, hence to maximize the number of triangles, it must be that $1 \leqslant n_{i+1}-n_{i} \leqslant 2$.

If $n_{i+1}-n_{i}=2$ for 2 values, without loss of generality, assume $n_{2}-n_{1}=2, n_{10}-n_{9}=2$, make the adjustment: $n_{10}^{\prime}=$ $n_{10}-1, n_{1}^{\prime}=n_{1}+1$, all others remain unchanged, after adjustment the constraints are still satisfied, and the number of triangles
$$
\sum_{k<i<k \leqslant 30} n_{i} n_{j} n_{k}=\sum_{i, j, k \neq 1,10} n_{i} n_{j} n_{k}+\left(n_{1}+n_{10}\right) \sum_{j, k \neq 1,10} n_{j} n_{k}+n_{1} n_{10} \sum_{k \neq 1,10} n_{k}
$$
increases after adjustment, to maximize the number of triangles, the number of $i$ such that $n_{i+1}-n_{i}=2$ can be at most one.

Let $r \in\{1,2, \cdots, 29\}$ such that $n_{30-r+1}-n_{30-r}=2$; then the sequence $n_{1}, n_{2}, \cdots, n_{30-r}$, $n_{30-r+1}-1, \cdots, n_{30}-1$ is an arithmetic sequence with the first term $a=n_{1}$, $a, a+1, \cdots, a+29$, its sum is $30 a+\frac{29 \times 30}{2}=2005-r, 1570=30 a+r$.
Thus, $a=52, r=10$.
The division $52,53, \cdots, 70,71,73,74, \cdots, 82$ is the desired solution.