Problem 3. Calculate the value of the expression:

$$
\left(1^{2}+2^{2}+3^{2}+\ldots+2017^{2}\right)-(1 \cdot 3+2 \cdot 4+\ldots+2016 \cdot 2018)
$$
Solution. For every natural number $n$, it holds that $(n-1)(n+1)=n^{2}-1$. By applying the last equality for $n=2,3, \ldots, 2017$, we get

$$
\begin{aligned}
& \left(1^{2}+2^{2}+3^{2}+\ldots+2017^{2}\right)-(1 \cdot 3+2 \cdot 4+\ldots+2016 \cdot 2018)= \\
& \left(1^{2}+2^{2}+3^{2}+\ldots+2017^{2}\right)-((2-1)(2+1)+(3-1)(3+1)+\ldots+(2017-1)(2017+1))= \\
& \left(1^{2}+2^{2}+3^{2}+\ldots+2017^{2}\right)-\left(\left(2^{2}-1\right)+\left(3^{2}-1\right)+\ldots+\left(2017^{2}-1\right)=\right. \\
& \left(1^{2}+2^{2}+3^{2}+\ldots+2017^{2}\right)-\left(1^{2}+2^{2}+3^{2}+\ldots+2017^{2}-2017\right)=2017
\end{aligned}
$$