I consider a finite quadratic grid with side length $n\in\mathbb{N}$. Every square in the grid will be colored, such that every color appears at most once in any row or column. Additionally, all diagonal elements have the same color and I impose the condition that the coloring of the grid is symmetric with respect to diagonal when represented as a matrix. How many colors, additionally to the color of diagonal, do I need at least to color the square?
Using some examples, I came to the conclusion that for $n$ odd, I need $n$ colors and for $n$ even I need $n-1$. For the proof, I define $\chi(n)$ as said number and I use that there are $\binom{n}{2}$ fields in the upper triangle and the first line has to contain $n-1$ different colors. Additionally, all colors have to appear with the same frequency $\alpha\in\mathbb{N}$ in the whole square, such that $n(n-1)=\alpha\chi(n)$. Note that $\alpha$ has to be even, since all colors appear the as many times below the diagonal as they do above. Now, if $n$ is even, then for $\alpha = n$ we obtain $\chi(n)=n-1$ and this gives a viable coloring of the square. Now assume that for $n$ odd, we also have $\chi(n)=n-1$. Then $\alpha = n$ also in this case, but this is a contradiction to $\alpha$ being even and the next larger possibility $\chi(n)=n$ gives $\alpha=n-1$ and, therefore, a viable coloring.
Is this correct or did I miss something? Maybe it can be done in a more elegant way.