I have attempted to do a question that I crafted by hand: 6239^5 mod 15367
I know that 15367 is made up of prime numbers, notably 121 and 127.
Hence, I break it down by doing 6239^5 mod 121 and 6239^5 mod 127 individually. This yields the following results
6239^5 mod 121 = 109
6239^5 mod 127 = 64
Now I know that x is congruent in the following way:
x ≡ 109 (mod 121)
x ≡ 64 (mod 127)
As such this can then be calculated as:
109 + 121k ≡ 64 (mod 127)
121k (mod 127) ≡ (64-109) (mod 127)
121k (mod 127) ≡ -45 (mod 127)
-6k ≡ -45 (mod 127)
k = 45/6
So we substitute the k into the first formula:
109 + 121k
= 109 + 121(45/6 + 127u)
= 109 + 907.5 + 127u.
I'm stuck now because 907.5 is a decimal.
How do I now work out the final answer?
$$-6k\equiv-45\mod 127$$
$$2k\equiv15\equiv142 \mod 127$$
$$k\equiv71\mod 127$$