3. In an $n \times n$ checkerboard, the rows are numbered 1 to $n$ from top to bottom, and the columns are numbered 1 to $n$ from left to right. Chips are to be placed on this board so that each square has a number of chips equal to the absolute value of the difference of the row and column numbers. If the total number of chips placed on the board is 2660 , find $n$.
Answer: 20
Solution: The total number of chips for an $n \times n$ board is equal to
$$
\begin{aligned}
n \times 0+2 \times(n-1) \times 1+2 \times(n-2) \times 2+\cdots+2 \times 1 \times(n-1) & =\sum_{i=1}^{n} 2 \times(n-i) \times i \\
& =2\left(n \sum_{i=1}^{n} i-\sum_{i=1}^{n} i^{2}\right) \\
& =2\left(n \frac{n(n+1)}{2}-\frac{n(n+1)(2 n+1)}{6}\right) \\
& =\frac{1}{3} n^{3}-\frac{1}{3} n
\end{aligned}
$$

Find $n$ such that $\frac{1}{3} n^{3}-\frac{1}{3} n=2660$. This leads to $n^{3}-n=7980$. Note that $n^{3}-n-7980=(n-20)\left(n^{2}+\right.$ $20 n+399)=0$ and the only integer satifying it is 20 .