How to prove that $2^n \equiv n \pmod p\:$ iff $n=(p-1)(kp-1), k \in \mathbb{Z}$?

52 Views Asked by At

Okay, I am solving equivalence $2^n \equiv n \mod p$ for $n \in \mathbb{N}$ and odd prime $p$.

I got that if $n = (p-1)(kp-1)$ then we have a solution (using Fermat's little theorem)

But is it true that only such $n$'s are appropriate? Is there a way to prove that?

1

There are 1 best solutions below

2
On BEST ANSWER

For $n=5$ and $p=3$ you have $2^5\equiv5\pmod{3}$ but $5$ is not divisible by $p-1=2$.