Pythagoras Patchwork

Mr Malkin
(The app may take a few seconds to load.)
Each integer coordinate is shaded depending upon the remainder when is divided by , with greater remainders given darker shading. Use the blue slider to change the value of , or press "Play/Stop". Use the checkbox to highlight when a remainder of is given (i.e. when is a multiple of ). Some questions:
  • What are the symmetries of the patterns?
  • Which values of give the greatest numbers of zeros? (Why does give so many but so few?)
  • Why do circles form, and what is happening in between the circles?
(Further details on Stackexchange.)