Problem:
A grid is called groovy if each cell of the grid is labeled with the smallest positive integer that does not appear below it in the same column or to the left of it in the same row. Compute the sum of the entries of a groovy grid whose bottom left entry is .
Problem 308
Official solution
Solution:
The following diagram is the entire groovy grid computed out. However, one will not need to write out every single entry to obtain the answer.
| 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 15 | 16 | 13 | 14 | 11 | 12 | 9 | 10 | 7 | 8 | 5 | 6 | 3 | 4 | 1 | 2 |
| 14 | 13 | 16 | 15 | 10 | 9 | 12 | 11 | 6 | 5 | 8 | 7 | 2 | 1 | 4 | 3 |
| 13 | 14 | 15 | 16 | 9 | 10 | 11 | 12 | 5 | 6 | 7 | 8 | 1 | 2 | 3 | 4 |
| 12 | 11 | 10 | 9 | 16 | 15 | 14 | 13 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 |
| 11 | 12 | 9 | 10 | 15 | 16 | 13 | 14 | 3 | 4 | 1 | 2 | 7 | 8 | 5 | 6 |
| 10 | 9 | 12 | 11 | 14 | 13 | 16 | 15 | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 7 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 |
| 7 | 8 | 5 | 6 | 3 | 4 | 1 | 2 | 15 | 16 | 13 | 14 | 11 | 12 | 9 | 10 |
| 6 | 5 | 8 | 7 | 2 | 1 | 4 | 3 | 14 | 13 | 16 | 15 | 10 | 9 | 12 | 11 |
| 5 | 6 | 7 | 8 | 1 | 2 | 3 | 4 | 13 | 14 | 15 | 16 | 9 | 10 | 11 | 12 |
| 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 12 | 11 | 10 | 9 | 16 | 15 | 14 | 13 |
| 3 | 4 | 1 | 2 | 7 | 8 | 5 | 6 | 11 | 12 | 9 | 10 | 15 | 16 | 13 | 14 |
| 2 | 1 | 4 | 3 | 6 | 5 | 8 | 7 | 10 | 9 | 12 | 11 | 14 | 13 | 16 | 15 |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
We prove the following key claim.
Claim 1. In the groovy grid, each row and column is a permutation of the numbers from to .
Proof. We use induction on . The base case is clear. Now, assume that we know this for a groovy grid, and we will prove it for a grid. To that end, we divide the grid into four subgrids of size .

The subgrid labeled is the groovy grid of size , so by induction, each row and column is a permutation of . Thus, the bottom left corner of the subgrid labeled is , and so the subgrid labeled is the groovy grid where each entry is added by . Hence, by induction hypothesis, each row and column of the subgrid labeled is a permutation of . The same argument applies for the subgrid labeled .
Finally, the subgrid labeled has enough numbers from and does not need any number greater than . The bottom left corner is . Hence, it must be a groovy grid. Thus, the induction hypothesis applies, and each row and column of the subgrid labeled is a permutation of . By considering all subgrids together, we find that each row and column of the entire grid is a permutation of .
In particular, we have that every row and column of the grid is a permutation of . To compute the sum of entries of the grid, we can take out rows and columns and add back the top right which we know entries by following the proof of the claim. This gives the final answer of