// 2007-02-24 q:=2^20; e:=75; f:=(q-1) div e; Z:=Integers(); K:=GF(q); a^20+a^10+a^9+a^7+a^6+a^5+a^4+a+1 eq 0; b:=a^e; w:=-1; chi:=function(a) return w^(Z!Trace(a)); end function; g:=[ &+[ chi(a^j*b^i) : i in {0..f-1} ] : j in [0..e-1] ]; g eq [541,29,29,-67,29,221,-67,-3,29,-67,221,-3,-67,-3,-3,29,29,29, -67,29,221,-67,-3,29,-67,221,-3,-67,-3,-3,29,29,29,-67,29,-291, -67,-3,29,-67,221,-3,-67,-3,-3,29,29,29,-67,29,221,-67,-3,29, -67,-291,-3,-67,-3,-3,29,29,29,-67,29,-291,-67,-3,29,-67,-291, -3,-67,-3,-3]; e:=75; Z:=Integers(); Ze:=Set(Integers(e)); P0:=function(i,j) return g[(Z!(i+j))+1]; end function; R2:={Ze|0,3,6,9,12}; R3:={Ze|i+25:i in R2}; R4:={Ze|i+50:i in R2}; R1:=Ze diff (R2 join R3 join R4); { [ &+[ P0(i,j) : j in R1 ], &+[ P0(i,j) : j in R2 ], &+[ P0(i,j) : j in R3 ], &+[ P0(i,j) : j in R4 ] ] : i in Ze } eq { [ -820, 273, 273, 273 ], [ 204, 273, -239, -239 ], [ 204, -239, 273, -239 ], [ 204, -239, -239, 273 ] };