what is the leat residue of a 494 modulo 23 b 5099 modulo 17
what is the leat residue of
a) 49^4 modulo 23
b) 50^99 modulo 17
Solution
Solve leastresidueof49^4 mod 23 using modular exponentiation
We start by building an algorithm where n is our exponent = 4, y = 1 and u least residue of 49 mod 23 = 0, shown here
n = 4 is even
Since 4 is even, we keep y = 1 as is
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 23
u2 mod p = 0 mod 23
we see that 0 mod 23 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 4 ÷ 2 = 2
n = 2 is even
Since 2 is even, we keep y = 1 as is
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 23
u2 mod p = 0 mod 23
we see that 0 mod 23 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 2 ÷ 2 = 1
n = 1 is odd
Since 1 is odd, we calculate (y)(u) mod p
(y)(u) mod p = (1)(0) mod 23
(y)(u) mod p = 0 mod 23
we see that 0 mod 23 = 0, so we reset y to this value
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 23
u2 mod p = 0 mod 23
we see that 0 mod 23 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 1 ÷ 2 = 0
Because n = 0, we have our answer by using y = 0
least residueof 49^4 mod 23 0
b).
Solve leastresidueof50^99 mod 17 using modular exponentiation
We start by building an algorithm where n is our exponent = 99, y = 1 and u least residue of 50 mod 17 = 0, shown here
n = 99 is odd
Since 99 is odd, we calculate (y)(u) mod p
(y)(u) mod p = (1)(0) mod 17
(y)(u) mod p = 0 mod 17
we see that 0 mod 17 = 0, so we reset y to this value
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 17
u2 mod p = 0 mod 17
we see that 0 mod 17 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 99 ÷ 2 = 49
n = 49 is odd
Since 49 is odd, we calculate (y)(u) mod p
(y)(u) mod p = (0)(0) mod 17
(y)(u) mod p = 0 mod 17
we see that 0 mod 17 = 0, so we reset y to this value
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 17
u2 mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 49 ÷ 2 = 24
n = 24 is even
Since 24 is even, we keep y = 0 as is
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 17
u2 mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 24 ÷ 2 = 12
n = 12 is even
Since 12 is even, we keep y = 0 as is
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 17
u2 mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 12 ÷ 2 = 6
n = 6 is even
Since 6 is even, we keep y = 0 as is
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 17
u2 mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 6 ÷ 2 = 3
n = 3 is odd
Since 3 is odd, we calculate (y)(u) mod p
(y)(u) mod p = (0)(0) mod 17
(y)(u) mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset y to this value
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 17
u2 mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 3 ÷ 2 = 1
n = 1 is odd
Since 1 is odd, we calculate (y)(u) mod p
(y)(u) mod p = (0)(0) mod 17
(y)(u) mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset y to this value
Our next substep is to determine u2 mod p
u2 mod p = 02 mod 17
u2 mod p = 0 mod 17
Using our modulus calculator, we see that 0 mod 17 = 0, so we reset u to this value
The final step is to cut n in half and take the integer value 1 ÷ 2 = 0
Because n = 0, we have our answer by using y = 0
least residue of 50^99 mod 17 0


