88^23 mod 187

asked by guest
on Nov 23, 2024 at 9:54 am



You asked:

Evaluate \({88}^{23}\) modulo \(187\)

MathBot Answer:

\[{88}^{23} \bmod 187 = 11\]


When dealing with an exponential expression, use the square-and-multiply algorithm to calculate the answer in a faster and easier way than evaluation and division.

First, find the binary representation of the exponent. The binary representation of \(23\) is \(\mathtt{\text{10111}}\). Create rows corresponding to each digit of the binary representation.

Place the base in the row corresponding to the first binary digit. For each subsequent digit in the binary representation perform one of two operations:
 - If the digit is 0, square the result from the previous row and calculate the result modulo \(187\).
 - If the digit is 1, square the result from the previous row and calculate the result modulo \(187\). Multiply that result by the base and calculate the result of that operation modulo \(187\).
The result corresponding to the last digit in the binary representation is the answer.$$\begin{aligned}\mathtt{\text{1}}&\,\,\,|\,\, 88\\\mathtt{\text{0}}&\,\,\,|\,\, 88^2 \bmod 187 = 77\\\mathtt{\text{1}}&\,\,\,|\,\, 77^2 \bmod 187 = 132, 132 \cdot 88 \bmod 187 = 22\\\mathtt{\text{1}}&\,\,\,|\,\, 22^2 \bmod 187 = 110, 110 \cdot 88 \bmod 187 = 143\\\mathtt{\text{1}}&\,\,\,|\,\, 143^2 \bmod 187 = 66, 66 \cdot 88 \bmod 187 = 11\end{aligned}$$The answer is \(11\).