The task is to calculate: $128! \pmod{257}$ I know that I'm supposed to use Wilson's theorem but I don't know how to apply it here.
[Reopen note: we already have answers (e.g. here) showing how to use Wilson's theorem to deduce $\,128!^2\equiv -1\equiv 16^2\pmod{\!257}\,$ so what remains is proving whether $\,128!\equiv 16\,$ or $\,128!\equiv -16\pmod{\!257}\ $ -- Bill D.]
It's not hard, however, to run a quick program and show that the answer is 16 and not -16.
– Alvin Chen Jan 02 '20 at 19:32