# Examples of the multiplicative groups of integers mod p and sums of squares

See below.

p=13. Generator g=2. √(-1)=8

 g0 1 g1 2 g2 4 g3 8 g4 3 g5 6 g6 12 g7 11 g8 9 g9 5 g10 10 g11 7

 12+82 =65 =5×13=0 mod 13 22+32 =13 =0 mod 13 42+62 =52 =4×13=0 mod 13

 122+82 =208 =16×13=0 mod 13 112+32 =130 =10×13=0 mod 13 92+62 =117 =9×13=0 mod 13

 12+52 =26 =2×13=0 mod 13 22+102 =104 =8×13=0 mod 13 42+72 =65 =5×13=0 mod 13

 122+52 =169 =13×13=0 mod 13 112+102 =221 =17×13=0 mod 13 92+72 =130 =10×13=0 mod 13

p=17. Generator g=3. √(-1)=13

 g0 1 g1 3 g2 9 g3 10 g4 13 g5 5 g6 15 g7 11 g8 16 g9 14 g10 8 g11 7 g12 4 g13 12 g14 2 g15 6 g16 1

 12+132 =170 =10×17=0 mod 17 32+52 =34 =2×17=0 mod 17 92+152 =306 =18×17=0 mod 17 102+112 =221 =13×17=0 mod 17

 162+132 =425 =25×17=0 mod 17 142+52 =221 =13×17=0 mod 17 82+152 =289 =17×17=0 mod 17 72+112 =170 =10×17=0 mod 17

 12+42 =17 =0 mod 17 32+122 =153 =9×17=0 mod 17 92+22 =85 =5×17=0 mod 17 102+62 =136 =8×17=0 mod 17

 162+42 =271 =16×17=0 mod 17 142+122 =340 =20×17=0 mod 17 82+22 =68 =4×17=0 mod 17 72+62 =85 =5×17=0 mod 17