This is more or less a discrete version of a 2D low discrepancy sequence, which is often used for choosing different colours.
The best known solution is plastic numbers. I expect you could use something like that here rather than brute force.
http://extremelearning.com.au/unreasonable-effectiveness-of-...