Hey inoid.
If (p-1)! = (p-1) (mod k) then (p-1)! - (p-1) = 0 mod (k) which means (p-1)! - (p-1) | k or (p-1)*([p-2)! - 1] = kn for some integer n. Can you complete the rest?
Consider p = 5, you will get the answer.
Salahuddin
Maths online
Ok, don't worry, I will explain.
If p = 5, then (First of all convince yourself that 5 is a prime number. If you cant understand that, dont worry, please ask, I will explain that also).
p - 1 = 4, (p - 1)! = 4! = 1 * 2 * 3 * 4 = 2 * 3 * 4 = 6 * 4 = 24.
It says to find k, when (24 = 4) mod k.
The given options are:
(p + 1) = (5 + 1) = 6.
(p - 1) * p / 2 = (5 - 1) * 5 / 2 = 4 * 5 / 2 = 20 / 2 = 10
(p + 1) * p / 2 = (5 + 1) * 5 / 2 = 6 * 5 / 2 = 30 / 2 = 15.
p^2 = 5^2 = 25.
Take modulo for each of these numbers and check if 24 and 4 give the same moduli, with these numbers. Whichever number (among 6, 10, 15 and 25) gives same modulus, that is your answer k.
Salahuddin
Maths online