Find two odd primes for which $(p-1)!≡-1\mod p^2$ where $p \le13$?

473 Views Asked by At

Except brute force is there some way to solve this ? One way we can solve it by using Wilson's theorem but I was not able to proceed much.

1

There are 1 best solutions below

5
On BEST ANSWER

There are only $5$ odd primes $p$ with $p\leq13$. Computing $(p-1)!\pmod{p^2}$ for each of them can hardly be called brute force; I don't need pen and paper to check that $$2!\not\equiv-1\pmod{9},\qquad 4!\equiv-1\pmod{25},\qquad 6!\not\equiv-1\pmod{49},$$ and the phrasing of the question suggests that at least one of $p=11$ or $p=13$ satisfies the congruence, so it suffices to compute $10!\pmod{121}$.