An interesting question came up in the Puzzling Stack Exchange a few days ago about "queen-connected sets". When trying to solve this problem, I came across an arrangement of five colours of queens that would not attack each other on a toroidal 5×5 chessboard, and discovered that 4 queens could be placed into two non-attacking groups but not four individual ones.
Let a queen number be a number $n$ where there exists an arrangement of $n$ colours of $n$ queens that are placed on an $n \times n$ chessboard, such that no queen can attack a queen of the same colour, including through broken diagonals.
5 is the smallest queen number, and the arrangement I found is the one where all of them are a knight's move away from each other:
1 2 3 4 5 3 4 5 1 2 5 1 2 3 4 2 3 4 5 1 4 5 1 2 3
I haven't come across a way to prove that 6 is not a queen number, although I suspect that's true. I also tried making an arrangement for 10 just now using the same method that I used for 5, but it didn't work:
1234567890 4567890123 7890123456 0123456789 3456789012 6789012345 9012345678 2345678901 5678901234 8901234567
If you notice, every queen attacks the next queen 5 squares right and 5 squares down. But I don't know if there is another arrangement that does work.
Is there any way to determine the set of queen numbers without going through every arrangement to verify that it solves the problem?