We write down the positive integers from 1 in sequence up to some fixed $n$. Below them, we write the same numbers, but in reverse order. We then form the absolute value of the difference of the numbers that are one below the other, and add up these values. What will be the sum thus obtained?
We distinguish two cases:

a) when $n$ is even,

b) when $n$ is odd.

a) Write down the integers in ascending order, then write them in reverse order below, and form the differences of the numbers written one below the other:

| ascending order | 1 | 2 | 3 | $\ldots$ | $\frac{n}{2}$ | $\frac{n}{2}+1$ | $\ldots$ | $n-1$ | $n$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| reverse order | $\mathrm{n}$ | $\mathrm{n}-1$ |  | $\ldots$ | $\frac{n}{2}+1$ | $\frac{n}{2}$ | $\ldots$ | 2 | 1 |
| difference | $1-n$ | $3-n$ | $5-n$ |  | 1 | 1 |  | $n-3$ | $n-1$ |

The differences up to $\frac{n}{2}$ are negative, but in absolute value they are the same as the differences from $\frac{n}{2}+1$ to $n$, so it is sufficient to sum up to $\frac{n}{2}$ and take twice this sum. The differences form an arithmetic sequence where $a_{1}=|1-n|=n-1, d=-2$, the number of terms is $\frac{n}{2}$, and $a_{1}=1$. The sum of the sequence can be written as follows according to the known formula:

$$
S_{n}=\frac{1}{2} \cdot \frac{n}{2}(n-1+1)=\frac{n^{2}}{4}
$$

The desired sum is: $\frac{n^{2}}{2}$.

b) If $n$ is odd, similarly to the previous case,

| ascending order | 1 | 2 | 3 | $\ldots$ | $k-1$ | $k$ | $k+1$ | $\ldots$ | $n-1$ | $n$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| reverse order | n | n-1 | 3 | $\ldots$ | $k+1$ | $k$ | $k-1$ | $\cdots$ | 2 | 1 |
| difference | $1-n$ | $3-n$ | $5-n$ | $\cdots$ | -2 | $k$ | $k-1$ | $\cdots$ | 1 |  |

Now the number of terms in the arithmetic sequence has changed to $k=\frac{n+1}{2}$, and the last term is $a_{n}=0$.

The sum: $S_{n}=\frac{1}{2} \cdot \frac{n+1}{2}(n-1)=\frac{n^{2}-1}{4}$. The sum of the differences: $\frac{n^{2}-1}{2}$.