Proving a solution for the $n$-Queens Puzzle
Consider $i &lt; j$ between 0 and $ n-1$. Of course, the first coordinate can’t be same for any two queens, hence they aren’t in same row. 

Now, suppose, for the sake of contradiction, they lie on the same column. Then, $2(i-j) = nk$  for some natural $k$. Now, as n doesn’t contain 2 as it’s divisor, $k$ must be even. So, either $k$ is 0, which is not possible because that will contradict our assumption that $i$ and $j$ are not equal, or $k\geq 2$. In the latter case, $LHS = 2(i-j) &lt; 2(n-1) &lt; 2n \leq nk$, and hence $LHS \ne RHS$. Hence, we conclude that our assumption must have been incorrect and two queens positioned in this manner can’t lie on same column.

You still need to figure out the diagonal case.