Gaussian Prime by twobit

r=range(-23,24)
for y in r:
 s=""
 for x in r:p=x*x+y*y or 1;s+=" [ ]"[p**.5%16in[3,7,11]or 10103**~-p%p==1::2]
 print s

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page