Problem

Source: USAJMO 2024/4

Tags: AMC, USA(J)MO, USAJMO, JMO 2024 P4



Let $n \geq 3$ be an integer. Rowan and Colin play a game on an $n \times n$ grid of squares, where each square is colored either red or blue. Rowan is allowed to permute the rows of the grid and Colin is allowed to permute the columns. A grid coloring is orderly if: no matter how Rowan permutes the rows of the coloring, Colin can then permute the columns to restore the original grid coloring; and no matter how Colin permutes the columns of the coloring, Rowan can then permute the rows to restore the original grid coloring. In terms of $n$, how many orderly colorings are there? Proposed by Alec Sun