Question
Question: Remainder when 43^43^43 is divided by 40...
Remainder when 43^43^43 is divided by 40
27
Solution
We want to find the remainder when 434343 is divided by 40. This is equivalent to finding 434343(mod40).
Step 1: Simplify the base modulo 40.
43≡3(mod40). So, 434343≡34343(mod40).
Step 2: Apply Euler's totient theorem for the modulus 40.
The modulus is n=40. The base is a=3. Since gcd(3,40)=1, we can use Euler's theorem. First, calculate ϕ(40). The prime factorization of 40 is 23×51. ϕ(40)=ϕ(23)×ϕ(51)=(23−22)×(51−50)=(8−4)×(5−1)=4×4=16. By Euler's totient theorem, if gcd(a,n)=1, then aϕ(n)≡1(modn). Here, 316≡1(mod40).
Step 3: Evaluate the exponent modulo ϕ(40)=16.
We need to find the value of the exponent 4343 modulo 16. Let E=4343. We need to find E(mod16).
Step 4: Simplify the base of the exponent modulo 16.
43≡11(mod16). So, 4343≡1143(mod16).
Step 5: Apply Euler's totient theorem for the modulus 16.
The modulus is m=16. The base is b=11. Since gcd(11,16)=1, we can use Euler's theorem. First, calculate ϕ(16). The prime factorization of 16 is 24. ϕ(16)=24−23=16−8=8. By Euler's totient theorem, 118≡1(mod16).
Step 6: Evaluate the exponent of the exponent modulo ϕ(16)=8.
We need to find the value of the exponent 43 modulo 8. 43=5×8+3. So, 43≡3(mod8).
Step 7: Use the result from Step 6 to simplify 1143(mod16).
Since 118≡1(mod16) and 43≡3(mod8), we can write 43=8q+3 for some integer q. 1143=118q+3=(118)q×113. 1143≡(1)q×113(mod16). 1143≡113(mod16).
Step 8: Calculate 113(mod16).
111≡11(mod16). 112=121. Dividing 121 by 16 gives 121=7×16+9. So, 112≡9(mod16). 113=112×11≡9×11=99(mod16). Dividing 99 by 16 gives 99=6×16+3. So, 113≡3(mod16).
Step 9: Conclude the value of the exponent modulo 16.
From Step 4 and Step 8, E=4343≡1143≡3(mod16). This means the exponent 4343 can be written in the form 16j+3 for some non-negative integer j.
Step 10: Use the result from Step 9 to evaluate the original expression modulo 40.
We need to calculate 3E(mod40), where E≡3(mod16). Substituting E=16j+3, we get 316j+3(mod40). 316j+3=316j×33=(316)j×33. From Step 2, 316≡1(mod40). So, (316)j≡1j≡1(mod40). Therefore, 3E≡1×33(mod40). 3E≡27(mod40).
Step 11: State the final remainder.
The remainder when 434343 is divided by 40 is 27.