Problem

Source: OLCOMA Costa Rica National Olympiad, Final Round, 2015 3.2

Tags: combinatorics, algebra



In a video game, there is a board divided into squares, with $27$ rows and $27$ columns. The squares are painted alternately in black, gray and white as follows: $\bullet$ in the first row, the first square is black, the next is gray, the next is white, the next is black, and so on; $\bullet$ in the second row, the first is white, the next is black, the next is gray, the next is white, and so on; $\bullet$ in the third row, the order would be gray-white-black-gray and so on; $\bullet$ the fourth row is painted the same as the first, the fifth the same as the second, $\bullet$ the sixth the same as the third, and so on. In the box in row $i$ and column $j$, there are $ij$ coins. For example, in the box in row $15$ and column $20$ there are $(15) (20) = 300$ coins. Verify that in total there are, in the black squares, $9^2 (13^2 + 14^2 + 15^2)$ coins.