Calculate the sum S=1+2+3+4+5+6, where the terms of the sum are the elements form the class of residues modulo 7, Z7. Solution The class of residues modulo 7 is formed from the following elements: {0,1,2,3,4,5,6}. To calculate the sum easier, let\'s group the terms in this way: S=(1+6)+(2+5)+(3+4) S=7+7+7 Instead of the value 7, which is not an element of the class residues, we\'ll put the reminders obtained from the division with 7, which are all 0. So, S=0+0+0 S=0.