Let's determine the sum of the first $n$ terms of the following sequence:

$$
1+7+11+21+\cdots+\left[n(n+1)+(-1)^{n}\right]
$$
I. Solution: Ignoring the +1 and (-1) terms

$$
S_{n}^{\prime}=1 \cdot 2+2 \cdot 3+3 \cdot 4+\ldots+n(n+1)
$$

Dividing both sides by $1 \cdot 2$

$$
\begin{aligned}
\frac{S_{n}^{\prime}}{2} & =\frac{2 \cdot 1}{1 \cdot 2}+\frac{3 \cdot 2}{1 \cdot 2}+\frac{4 \cdot 3}{1 \cdot 2}+\ldots+\frac{(n+1) n}{1 \cdot 2}= \\
& =\binom{2}{2}+\binom{3}{2}+\binom{4}{2}+\ldots+\binom{n+1}{2}
\end{aligned}
$$

Using the property of binomial coefficients (see pages 30-31 of the "Combinatorics" booklet in the "Specialized Booklets for High School" series), that

$$
\begin{gathered}
\binom{n}{k}+\binom{n-1}{k}+\binom{n-2}{k}+\ldots+\binom{k+1}{k}+\binom{k}{k}=\binom{n+1}{k+1} \\
\frac{S_{n}^{\prime}}{2}=\binom{n+2}{3}=\frac{(n+2)(n+1) n}{1 \cdot 2 \cdot 3}
\end{gathered}
$$

from which

$$
S_{n}^{\prime}=\frac{n(n+1)(n+2)}{3}
$$

If we denote the sum of the sequence we are looking for by $S_{n}$, then

for even $n$, $S_{n}=S_{n}^{\prime}$,

for odd $n$, $S_{n}=S_{n}^{\prime}-1$.

(Kálmán Györy, József A. Grammar School, Ózd, III. grade)

II. Solution: Keeping the notation, $S_{n}$ can be written as

$$
S_{n}=\left(1^{2}+1-1\right)+\left(2^{2}+2+1\right)+\left(3^{2}+3-1\right)+\ldots+\left[n^{2}+n+(-1)^{n}\right]
$$

Rearranging

$$
\begin{aligned}
S_{n}=\left(1^{2}\right. & \left.+2^{2}+\ldots+n^{2}\right)+(1+2+\ldots+n)+ \\
+ & {\left[-1+1-1+\ldots+(-1)^{n}\right] }
\end{aligned}
$$

It is known that the sum in the first parentheses is $\frac{n(n+1)(2 n+1)}{6}$, the sum in the second parentheses is $\frac{n(n+1)}{2}$ according to the formula for the sum of an arithmetic sequence; the sum in the third parentheses is 0 if $n$ is even, and -1 if $n$ is odd.

The sum of the first two terms is

$$
\frac{n(n+1)(2 n+1)}{6}+\frac{3 n(n+1)}{6}=\frac{n(n+1)(2 n+4)}{6}=\frac{n(n+1)(n+2)}{3}
$$

and thus

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

(László Vannay, Ferences Grammar School, Esztergom, IV. grade)