Problem 2
Find all integers for which each cell of an table can be filled with one of the letters , , and in such a way that: in each row and each column, one third of the entries are , one third are , and one third are ; and in any diagonal, if the number of entries on the diagonal is a multiple of three, then one third of the entries on that diagonal are , one third are , and one third are . (Note that an table has diagonals in total, in both directions.)
Step 1 of 5: Construction: an explicit valid tile
In plain words
The following tile can be checked directly: every row, column, and diagonal whose length is a multiple of three has one third of each letter. Repeating the tile periodically gives every multiple of .
Detailed analysis
Use the tile IOMOMIMOI IOMOIMOIM IMIMOMIOO OIOIOMMIM MOIIMOIOM MIMOIOOMI OIOMMIMIO MMOIIOOMI OMIMOIIMO. A direct count along the nine rows, nine columns, and every diagonal of length , , or verifies the required one-third counts. Repeat this tile with period in both directions. Any diagonal segment of length divisible by then decomposes into complete three-step residue classes of the same periodic check, so it also has one third of each letter.