0

How many solutions does $x \equiv x^{-1} \pmod n$ have?

$n$ is defined to be a positive integer,

What I believe the solution will be is along the lines of 2 cases:

When $n = 1$, the set of solutions will just be $x \in \mathbb Z$ because $x \equiv x^{-1} \pmod 1$ can be rewritten as $x - x^{-1} \equiv 0 \pmod 1$ and mod 1 of any integer will always reduce to 0

When $n \gt 1$, I know we have to apply Chinese Remainder Theorem somehow, I just do not know how to approach this though. We can claim by the Fundamental Theorem of Arithmetic that $n = p_{1}^{k_{1}}p_{2}^{k_{2}}...p_{l}^{k_{l}}$ where $p_{i}$ are prime numbers. How would I continue?$\\$ I thought maybe multiplying both sides by $x$ and rearranging to get $x^{2} \equiv 1\pmod n$ could be of some help but I couldn't get any further.

Bernard
  • 175,478
Wallace
  • 436
  • 2
    $x \equiv x^{-1}$ is equivalent to $x^2 - 1 \equiv (x+1)(x-1) \equiv 0$. – Carlos Esparza Jan 18 '19 at 23:57
  • Hint: $(x!-!1,x!+!1) = (x!-!1,2)$ is coprime to odd primes $p,,$ so $,p^n\mid (x!-!1)(x!+!1),\Rightarrow,p^n\mid x-1$ or $,p^n\mid x+1\ \ $ – Bill Dubuque Jan 19 '19 at 00:28
  • @0x539 how does that help? I get that part but I do not understand where to go from that. I actually went down that path but I didn't know how to pursue from there, would we could consider separate cases for $(x+1)$ and $(x-1)$? – Wallace Jan 19 '19 at 00:32
  • @Wallace First if $n$ is prime it shows that the only solution are $1, -1$. If $n$ is composite then $x+1$ and $x-1$ need to contain all prime factors of $n$. This helps somewhat, for example if $n$ is an odd prime power then the only solutions are again $1, -1$. I don't claim this will provide a full solution but it seems promising to me. – Carlos Esparza Jan 19 '19 at 00:40
  • Hint. (1). If $p$ is an odd prime and $n\in \Bbb N$ then $p^n|(x+1)(x-1)$ iff $x\equiv \pm 1\mod p^n$...(2). If $n\in \Bbb N$ then $2^n|(x+1)(x-1)$ iff $x\equiv \pm 1 \mod 2^{n-1}. $ – DanielWainfleet Jan 19 '19 at 04:39
  • 1
  • @Wallace, When $x^2≡1 mod n$ , we may write $x^2=k. n +1$, there are infinitely many squares of form $k.n +1$ – sirous Jan 21 '19 at 03:20

0 Answers0