Skip to main content
Make title less ambiguous (very many questions with similar title).
Link

Question about Does Fermat's Little Theorem imply $n^{p-2} \equiv \frac{p+1}{n}$ (mod $p$)?

Source Link
Larry Freeman
  • 10.2k
  • 4
  • 26
  • 63

Question about Fermat's Little Theorem

Fermat's Little Theorem tells us for a prime $p$ if $\gcd(p,n)=1$, then:

$$n^{p-1} \equiv 1 \pmod p$$

If $n | (p+1)$, does it necessarily follow that:

$$n^{p-2} \equiv \frac{p+1}{n} \pmod p$$