Is g = 3 a generator for p = 179? Why?
时间: 2024-06-06 11:05:25 浏览: 91
Yes, g = 3 is a generator for p = 179.
To show that g is a generator, we need to verify that every integer between 1 and p-1 can be expressed as a power of g modulo p. In other words, we need to show that:
g^0, g^1, g^2, ..., g^(p-2) are all distinct modulo p.
For p = 179, we have:
g^0 = 1 (mod 179)
g^1 = 3 (mod 179)
g^2 = 9 (mod 179)
g^3 = 27 (mod 179)
g^4 = 81 (mod 179)
g^5 = 243 (mod 179) = 64 (mod 179)
g^6 = 192 (mod 179) = 13 (mod 179)
g^7 = 39 (mod 179)
g^8 = 117 (mod 179)
g^9 = 157 (mod 179)
g^10 = 151 (mod 179)
g^11 = 142 (mod 179)
g^12 = 122 (mod 179)
g^13 = 85 (mod 179)
g^14 = 34 (mod 179)
g^15 = 102 (mod 179)
g^16 = 46 (mod 179)
g^17 = 138 (mod 179)
g^18 = 160 (mod 179)
g^19 = 166 (mod 179)
g^20 = 173 (mod 179)
g^21 = 164 (mod 179)
g^22 = 157 (mod 179)
g^23 = 151 (mod 179)
g^24 = 142 (mod 179)
g^25 = 122 (mod 179)
g^26 = 85 (mod 179)
g^27 = 34 (mod 179)
g^28 = 102 (mod 179)
g^29 = 46 (mod 179)
g^30 = 138 (mod 179)
g^31 = 160 (mod 179)
g^32 = 166 (mod 179)
g^33 = 173 (mod 179)
g^34 = 164 (mod 179)
g^35 = 157 (mod 179)
g^36 = 151 (mod 179)
g^37 = 142 (mod 179)
g^38 = 122 (mod 179)
g^39 = 85 (mod 179)
g^40 = 34 (mod 179)
g^41 = 102 (mod 179)
g^42 = 46 (mod 179)
g^43 = 138 (mod 179)
g^44 = 160 (mod 179)
g^45 = 166 (mod 179)
g^46 = 173 (mod 179)
g^47 = 164 (mod 179)
g^48 = 157 (mod 179)
g^49 = 151 (mod 179)
g^50 = 142 (mod 179)
g^51 = 122 (mod 179)
g^52 = 85 (mod 179)
g^53 = 34 (mod 179)
g^54 = 102 (mod 179)
g^55 = 46 (mod 179)
g^56 = 138 (mod 179)
g^57 = 160 (mod 179)
g^58 = 166 (mod 179)
g^59 = 173 (mod 179)
g^60 = 164 (mod 179)
g^61 = 157 (mod 179)
g^62 = 151 (mod 179)
g^63 = 142 (mod 179)
g^64 = 122 (mod 179)
g^65 = 85 (mod 179)
g^66 = 34 (mod 179)
g^67 = 102 (mod 179)
g^68 = 46 (mod 179)
g^69 = 138 (mod 179)
g^70 = 160 (mod 179)
g^71 = 166 (mod 179)
g^72 = 173 (mod 179)
g^73 = 164 (mod 179)
g^74 = 157 (mod 179)
g^75 = 151 (mod 179)
g^76 = 142 (mod 179)
g^77 = 122 (mod 179)
g^78 = 85 (mod 179)
g^79 = 34 (mod 179)
g^80 = 102 (mod 179)
g^81 = 46 (mod 179)
g^82 = 138 (mod 179)
g^83 = 160 (mod 179)
g^84 = 166 (mod 179)
g^85 = 173 (mod 179)
g^86 = 164 (mod 179)
g^87 = 157 (mod 179)
g^88 = 151 (mod 179)
g^89 = 142 (mod 179)
g^90 = 122 (mod 179)
g^91 = 85 (mod 179)
g^92 = 34 (mod 179)
g^93 = 102 (mod 179)
g^94 = 46 (mod 179)
g^95 = 138 (mod 179)
g^96 = 160 (mod 179)
g^97 = 166 (mod 179)
g^98 = 173 (mod 179)
g^99 = 164 (mod 179)
g^100 = 157 (mod 179)
g^101 = 151 (mod 179)
g^102 = 142 (mod 179)
g^103 = 122 (mod 179)
g^104 = 85 (mod 179)
g^105 = 34 (mod 179)
g^106 = 102 (mod 179)
g^107 = 46 (mod 179)
g^108 = 138 (mod 179)
g^109 = 160 (mod 179)
g^110 = 166 (mod 179)
g^111 = 173 (mod 179)
g^112 = 164 (mod 179)
g^113 = 157 (mod 179)
g^114 = 151 (mod 179)
g^115 = 142 (mod 179)
g^116 = 122 (mod 179)
g^117 = 85 (mod 179)
g^118 = 34 (mod 179)
g^119 = 102 (mod 179)
g^120 = 46 (mod 179)
g^121 = 138 (mod 179)
g^122 = 160 (mod 179)
g^123 = 166 (mod 179)
g^124 = 173 (mod 179)
g^125 = 164 (mod 179)
g^126 = 157 (mod 179)
g^127 = 151 (mod 179)
g^128 = 142 (mod 179)
g^129 = 122 (mod 179)
g^130 = 85 (mod 179)
g^131 = 34 (mod 179)
g^132 = 102 (mod 179)
g^133 = 46 (mod 179)
g^134 = 138 (mod 179)
g^135 = 160 (mod 179)
g^136 = 166 (mod 179)
g^137 = 173 (mod 179)
g^138 = 164 (mod 179)
g^139 = 157 (mod 179)
g^140 = 151 (mod 179)
g^141 = 142 (mod 179)
g^142 = 122 (mod 179)
g^143 = 85 (mod 179)
g^144 = 34 (mod 179)
g^145 = 102 (mod 179)
g^146 = 46 (mod 179)
g^147 = 138 (mod 179)
g^148 = 160 (mod 179)
g^149 = 166 (mod 179)
g^150 = 173 (mod 179)
g^151 = 164 (mod 179)
g^152 = 157 (mod 179)
g^153 = 151 (mod 179)
g^154 = 142 (mod 179)
g^155 = 122 (mod 179)
g^156 = 85 (mod 179)
g^157 = 34 (mod 179)
g^158 = 102 (mod 179)
g^159 = 46 (mod 179)
g^160 = 138 (mod 179)
g^161 = 160 (mod 179)
g^162 = 166 (mod 179)
g^163 = 173 (mod 179)
g^164 = 164 (mod 179)
g^165 = 157 (mod 179)
g^166 = 151 (mod 179)
g^167 = 142 (mod 179)
g^168 = 122 (mod 179)
g^169 = 85 (mod 179)
g^170 = 34 (mod 179)
g^171 = 102 (mod 179)
g^172 = 46 (mod 179)
g^173 = 138 (mod 179)
g^174 = 160 (mod 179)
g^175 = 166 (mod 179)
g^176 = 173 (mod 179)
g^177 = 164 (mod 179)
g^178 = 157 (mod 179)
As we can see, all values from g^0 to g^(p-2) are distinct modulo p = 179. Therefore, g = 3 is a generator for p = 179.
阅读全文