n = 187
11 = 11
17 = 17
22 = 2 * 11
33 = 3 * 11
34 = 2 * 17
44 = 2^2 * 11
51 = 3 * 17
55 = 5 * 11
66 = 2 * 3 * 11
68 = 2^2 * 17
77 = 7 * 11
85 = 5 * 17
88 = 2^3 * 11
99 = 3^2 * 11
102 = 2 * 3 * 17
110 = 2 * 5 * 11
119 = 7 * 17
121 = 11^2
132 = 2^2 * 3 * 11
136 = 2^3 * 17
143 = 11 * 13
153 = 3^2 * 17
154 = 2 * 7 * 11
165 = 3 * 5 * 11
170 = 2 * 5 * 17
176 = 2^4 * 11
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 101, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 116, 117, 118, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 137, 138, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 151, 152, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166, 167, 168, 169, 171, 172, 173, 174, 175, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186]
True
The order of element 1 is 1.
1 divides 160
The order of element 2 is 40.
40 divides 160
The order of element 3 is 80.
80 divides 160
The order of element 4 is 20.
20 divides 160
The order of element 5 is 80.
80 divides 160
The order of element 6 is 80.
80 divides 160
The order of element 7 is 80.
80 divides 160
The order of element 8 is 40.
40 divides 160
The order of element 9 is 40.
40 divides 160
The order of element 10 is 16.
16 divides 160
The order of element 12 is 16.
16 divides 160
The order of element 13 is 20.
20 divides 160
The order of element 14 is 80.
80 divides 160
The order of element 15 is 40.
40 divides 160
The order of element 16 is 10.
10 divides 160
The order of element 18 is 10.
10 divides 160
The order of element 19 is 40.
40 divides 160
The order of element 20 is 80.
80 divides 160
The order of element 21 is 4.
4 divides 160
The order of element 23 is 16.
16 divides 160
The order of element 24 is 80.
80 divides 160
The order of element 25 is 40.
40 divides 160
The order of element 26 is 40.
40 divides 160
The order of element 27 is 80.
80 divides 160
The order of element 28 is 80.
80 divides 160
The order of element 29 is 80.
80 divides 160
The order of element 30 is 20.
20 divides 160
The order of element 31 is 80.
80 divides 160
The order of element 32 is 8.
8 divides 160
The order of element 35 is 10.
10 divides 160
The order of element 36 is 40.
40 divides 160
The order of element 37 is 80.
80 divides 160
The order of element 38 is 20.
20 divides 160
The order of element 39 is 80.
80 divides 160
The order of element 40 is 80.
80 divides 160
The order of element 41 is 80.
80 divides 160
The order of element 42 is 40.
40 divides 160
The order of element 43 is 8.
8 divides 160
The order of element 45 is 16.
16 divides 160
The order of element 46 is 80.
80 divides 160
The order of element 47 is 20.
20 divides 160
The order of element 48 is 80.
80 divides 160
The order of element 49 is 40.
40 divides 160
The order of element 50 is 10.
10 divides 160
The order of element 52 is 10.
10 divides 160
The order of element 53 is 40.
40 divides 160
The order of element 54 is 16.
16 divides 160
The order of element 56 is 16.
16 divides 160
The order of element 57 is 80.
80 divides 160
The order of element 58 is 80.
80 divides 160
The order of element 59 is 40.
40 divides 160
The order of element 60 is 40.
40 divides 160
The order of element 61 is 80.
80 divides 160
The order of element 62 is 80.
80 divides 160
The order of element 63 is 80.
80 divides 160
The order of element 64 is 20.
20 divides 160
The order of element 65 is 16.
16 divides 160
The order of element 67 is 2.
2 divides 160
The order of element 69 is 5.
5 divides 160
The order of element 70 is 40.
40 divides 160
The order of element 71 is 80.
80 divides 160
The order of element 72 is 20.
20 divides 160
The order of element 73 is 80.
80 divides 160
The order of element 74 is 80.
80 divides 160
The order of element 75 is 80.
80 divides 160
The order of element 76 is 8.
8 divides 160
The order of element 78 is 16.
16 divides 160
The order of element 79 is 80.
80 divides 160
The order of element 80 is 80.
80 divides 160
The order of element 81 is 20.
20 divides 160
The order of element 82 is 80.
80 divides 160
The order of element 83 is 40.
40 divides 160
The order of element 84 is 10.
10 divides 160
The order of element 86 is 5.
5 divides 160
The order of element 87 is 8.
8 divides 160
The order of element 89 is 4.
4 divides 160
The order of element 90 is 80.
80 divides 160
The order of element 91 is 80.
80 divides 160
The order of element 92 is 80.
80 divides 160
The order of element 93 is 40.
40 divides 160
The order of element 94 is 40.
40 divides 160
The order of element 95 is 80.
80 divides 160
The order of element 96 is 80.
80 divides 160
The order of element 97 is 80.
80 divides 160
The order of element 98 is 4.
4 divides 160
The order of element 100 is 8.
8 divides 160
The order of element 101 is 10.
10 divides 160
The order of element 103 is 5.
5 divides 160
The order of element 104 is 40.
40 divides 160
The order of element 105 is 80.
80 divides 160
The order of element 106 is 20.
20 divides 160
The order of element 107 is 80.
80 divides 160
The order of element 108 is 80.
80 divides 160
The order of element 109 is 16.
16 divides 160
The order of element 111 is 8.
8 divides 160
The order of element 112 is 80.
80 divides 160
The order of element 113 is 80.
80 divides 160
The order of element 114 is 80.
80 divides 160
The order of element 115 is 20.
20 divides 160
The order of element 116 is 80.
80 divides 160
The order of element 117 is 40.
40 divides 160
The order of element 118 is 10.
10 divides 160
The order of element 120 is 2.
2 divides 160
The order of element 122 is 16.
16 divides 160
The order of element 123 is 20.
20 divides 160
The order of element 124 is 80.
80 divides 160
The order of element 125 is 80.
80 divides 160
The order of element 126 is 80.
80 divides 160
The order of element 127 is 40.
40 divides 160
The order of element 128 is 40.
40 divides 160
The order of element 129 is 80.
80 divides 160
The order of element 130 is 80.
80 divides 160
The order of element 131 is 16.
16 divides 160
The order of element 133 is 16.
16 divides 160
The order of element 134 is 40.
40 divides 160
The order of element 135 is 10.
10 divides 160
The order of element 137 is 5.
5 divides 160
The order of element 138 is 40.
40 divides 160
The order of element 139 is 80.
80 divides 160
The order of element 140 is 20.
20 divides 160
The order of element 141 is 80.
80 divides 160
The order of element 142 is 16.
16 divides 160
The order of element 144 is 8.
8 divides 160
The order of element 145 is 40.
40 divides 160
The order of element 146 is 80.
80 divides 160
The order of element 147 is 80.
80 divides 160
The order of element 148 is 80.
80 divides 160
The order of element 149 is 20.
20 divides 160
The order of element 150 is 80.
80 divides 160
The order of element 151 is 40.
40 divides 160
The order of element 152 is 10.
10 divides 160
The order of element 155 is 8.
8 divides 160
The order of element 156 is 80.
80 divides 160
The order of element 157 is 20.
20 divides 160
The order of element 158 is 80.
80 divides 160
The order of element 159 is 80.
80 divides 160
The order of element 160 is 80.
80 divides 160
The order of element 161 is 40.
40 divides 160
The order of element 162 is 40.
40 divides 160
The order of element 163 is 80.
80 divides 160
The order of element 164 is 16.
16 divides 160
The order of element 166 is 4.
4 divides 160
The order of element 167 is 80.
80 divides 160
The order of element 168 is 40.
40 divides 160
The order of element 169 is 10.
10 divides 160
The order of element 171 is 10.
10 divides 160
The order of element 172 is 40.
40 divides 160
The order of element 173 is 80.
80 divides 160
The order of element 174 is 20.
20 divides 160
The order of element 175 is 16.
16 divides 160
The order of element 177 is 16.
16 divides 160
The order of element 178 is 40.
40 divides 160
The order of element 179 is 40.
40 divides 160
The order of element 180 is 80.
80 divides 160
The order of element 181 is 80.
80 divides 160
The order of element 182 is 80.
80 divides 160
The order of element 183 is 20.
20 divides 160
The order of element 184 is 80.
80 divides 160
The order of element 185 is 40.
40 divides 160
The order of element 186 is 2.
2 divides 160
Below is a list of the order of elements g in Z_n
[1, 40, 80, 20, 80, 80, 80, 40, 40, 16, 16, 20, 80, 40, 10, 10, 40, 80, 4, 16, 80, 40, 40, 80, 80, 80, 20, 80, 8, 10, 40, 80, 20, 80, 80, 80, 40, 8, 16, 80, 20, 80, 40, 10, 10, 40, 16, 16, 80, 80, 40, 40, 80, 80, 80, 20, 16, 2, 5, 40, 80, 20, 80, 80, 80, 8, 16, 80, 80, 20, 80, 40, 10, 5, 8, 4, 80, 80, 80, 40, 40, 80, 80, 80, 4, 8, 10, 5, 40, 80, 20, 80, 80, 16, 8, 80, 80, 80, 20, 80, 40, 10, 2, 16, 20, 80, 80, 80, 40, 40, 80, 80, 16, 16, 40, 10, 5, 40, 80, 20, 80, 16, 8, 40, 80, 80, 80, 20, 80, 40, 10, 8, 80, 20, 80, 80, 80, 40, 40, 80, 16, 4, 80, 40, 10, 10, 40, 80, 20, 16, 16, 40, 40, 80, 80, 80, 20, 80, 40, 2]
g = [2, 8, 9]
m = [40, 40, 40]
[2, 4, 8, 16, 32, 64, 128, 69, 138, 89, 178, 169, 151, 115, 43, 86, 172, 157, 127, 67, 134, 81, 162, 137, 87, 174, 161, 135, 83, 166, 145, 103, 19, 38, 76, 152, 117, 47, 94, 1]
[8, 64, 138, 169, 43, 157, 134, 137, 161, 166, 19, 152, 94, 4, 32, 69, 178, 115, 172, 67, 162, 174, 83, 103, 76, 47, 2, 16, 128, 89, 151, 86, 127, 81, 87, 135, 145, 38, 117, 1]
[9, 81, 168, 16, 144, 174, 70, 69, 60, 166, 185, 169, 25, 38, 155, 86, 26, 47, 49, 67, 42, 4, 36, 137, 111, 64, 15, 135, 93, 89, 53, 103, 179, 115, 100, 152, 59, 157, 104, 1]
phi_n = 160 = 2^5 * 5
m1 = 2^3 * 5
40 divides 160
m2 = 2^4 * 5
40 divides 160
m3 = 2^2 * 5

Error in lines 47-50
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 3, in <module>
IndexError: list index out of range