+0  
 
0
689
2
avatar+261 

What is the residue modulo 13 of the sum of the modulo 13 inverses of the first 12 positive integers? Express your answer as an integer from 0 to 12, inclusive.

 Dec 31, 2019
 #1
avatar
+2

i=1;p=0;a=1;m=13;cycle:b=a%m; if(b*i % m==1,goto6, goto8);printa," - ","The mmi = ",i;p=p+i;i++;if(i<=(m-1), goto cycle, 0); i=1;m=13;a++;if(a<=12, goto cycle, 0);print"Total of All mmis =",p
 

 

1  -  The mmi =  1
2  -  The mmi =  7
3  -  The mmi =  9
4  -  The mmi =  10
5  -  The mmi =  8
6  -  The mmi =  11
7  -  The mmi =  2
8  -  The mmi =  5
9  -  The mmi =  3
10  -  The mmi =  4
11  -  The mmi =  6
12  -  The mmi =  12
Total of All mmis = 78
78 mod 13 = 0

 Dec 31, 2019
 #2
avatar+261 
0

thank you!

atlas9  Jan 2, 2020

4 Online Users

avatar
avatar