Content deleted Content added
fixed some errors regarding repeated prime factors in the totient |
m fixed index |
||
Line 15:
\end{align}
</math></center><br> (using [[Euler's theorem]]). With everything else now known, we may try each value of ''b''<sub>1</sub> to see which makes the equation be true. If <math>g^{\varphi(p)/p_1} \not\equiv 1 \pmod{p}</math>, then there is exactly one ''b''<sub>1</sub>, and that ''b''<sub>1</sub> is the value of ''x'' modulo ''p''<sub>1</sub>. (An exception arises if <math>g^{\varphi(p)/p_1} \equiv 1 \pmod{p}</math> since then the order of ''g'' is less than φ(''p''). The conclusion in this case depends on the value of <math>e^{\varphi(p)/p_1} \mod p</math> on the left: if this quantity is not 1, then no solution ''x'' exists; if instead this quantity is also equal to 1, there will be more than one solution for ''x'' less than φ(''p''), but since we are attempting to return only one solution ''x'', we may use ''b''<sub>1</sub>=0.)
:#The same operation is now performed for ''p''<sub>2</sub> through ''p<sub>n</sub>''.<br>A minor modification is needed where a prime number is repeated. Suppose we are seeing ''p<sub>i</sub>'' for the (''k'' + 1)st time. Then we already know ''c<sub>i</sub>'' in the equation ''x'' = ''a''<sub>''i''</sub> ''p''<sub>''i''</sub><sup>''k''+1</sup> + ''b''<sub>''i''</sub> ''p''<sub>''i''</sub><sup>''k''</sup> + ''c''<sub>''i''</sub>, and we find either ''b''<sub>''i''</sub> or ''c''<sub>''i''</sub> the same way as before, depending on whether <math>g^{\varphi(p)/
:# With all the ''b''<sub>''i''</sub> known, we have enough simultaneous [[congruence relation|congruence]]s to determine ''x'' using the [[Chinese remainder theorem]].
|