the answer is and we don't need the condition to prove this let

by the Fermat's little theorem, in we have as a result which is Wilson's theorem, and

for all thus, for any so your sum, modulo ,

is equal to

Remark 1. this method gives another proof for the problem you asked in here.

Remark 2. there's a theorem (i don't remember its name) which says that for any prime number does anybody know the

name of this theorem? anyway, using this result we get this stronger result that, modulo your sum for is still equal to