4
$\begingroup$

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.

$\endgroup$
  • 3
    $\begingroup$ There are only $5$ primes to check...I think brute force really is the way to go. $\endgroup$ – lulu Feb 10 at 16:57
  • 1
    $\begingroup$ Note: a quick search through the first 200 odd primes found only one example in addition to these two $≤13$. $\endgroup$ – lulu Feb 10 at 17:05
  • 2
    $\begingroup$ In the case, someone is interested, the next solution is $563$ and there is no further solution upto $10^5$. Googling "wilson prime" reveals that no further solution is known. $\endgroup$ – Peter Feb 10 at 17:10
  • 1
    $\begingroup$ Wilson's theorem is not helpful if we restrict to the primes anyway. Every prime satisfies $$(p-1)! \equiv -1\mod p$$ but only very few primes satisfy this stronger congruence. $\endgroup$ – Peter Feb 10 at 17:13
  • 1
    $\begingroup$ Wikipedia says no other solutions up to $2 \times 10^{13}$ $\endgroup$ – J. W. Tanner Feb 10 at 17:21
1
$\begingroup$

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}$.

$\endgroup$
  • 3
    $\begingroup$ $10!\equiv (2×3×4×5)×(6×8×10)×(7×9)\equiv (-1)×(-4)×(63)\equiv 252\equiv 10\bmod 121$, no good. $\endgroup$ – Oscar Lanzi Feb 10 at 17:33
  • $\begingroup$ @OscarLanzi Thanks for checking, I couldn't be bothered. The phrasing of the question then implies that $(13-1)!\equiv-1\pmod{13^2}$, which I also can't be bothered to check. $\endgroup$ – Servaes Feb 10 at 17:44
  • $\begingroup$ Anyone care to explain the downvote? $\endgroup$ – Servaes Feb 10 at 19:21
  • $\begingroup$ If they do, buy a lottery ticket. Your luck would be on a roll. (No, I did not downvote.) $\endgroup$ – Oscar Lanzi Feb 10 at 19:25
  • 1
    $\begingroup$ @OscarLanzi Haha thanks for the reality check. Luckily commenting is free. Who knows, one day... $\endgroup$ – Servaes Feb 10 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.