3-rd 1. The numbers \(1,2, \ldots, k^{2}\) are arranged in a square table

\[
\begin{array}{cccc}
1, & 2, & \ldots, & k \\
k+1, & k+2, & \ldots, & 2 k \\
\ldots & \ldots, & \ldots & \ldots \\
(k-1) k+1, & \ldots, & \ldots, & k^{2}
\end{array}
\]

An arbitrary number is written down, after which the row and column containing this number are crossed out from the table. The same is done with the remaining table of \((k-1)^{2}\) numbers, and so on, \(k\) times. Find the sum of the written numbers.
Solve 1. Answer: \(\frac{k\left(k^{2}+1\right)}{2}\).

Let's write the given table as

\[
\begin{array}{cccc}
k \cdot 0+1, & k \cdot 0+2, & \ldots, & k \cdot 0+k \\
k \cdot 1+1, & k \cdot 1+2, & \ldots, & k \cdot 1+k \\
\ldots & \ldots & \ldots, & \ldots \\
(k-1) k+1, & (k-1) k+2 & \ldots, & (k-1) k+k
\end{array}
\]

Each number in the table is represented in the form \(k a+b\), where \(0 \leqslant a \leqslant k-1\) and \(1 \leqslant b \leqslant k\). We will separately sum the terms \(k a\) and the terms \(b\). From each row, exactly one number is selected, so the terms \(k a\) will be present for each \(a=0,1, \ldots, k-1\). From each column, exactly one number is selected, so the terms \(b\) will be present for each \(b=1,2, \ldots, k\). Thus, the desired sum is

\[
k(0+1+2+\cdots+(k-1))+(1+2+\cdots+k)=k \cdot \frac{k(k-1)}{2}+\frac{k(k+1)}{2}=\frac{k\left(k^{2}+1\right)}{2}
\]