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












0












$begingroup$


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 1pmod n$ could be of some help but I couldn't get any further.










share|cite|improve this question











$endgroup$








  • 2




    $begingroup$
    $x equiv x^{-1}$ is equivalent to $x^2 - 1 equiv (x+1)(x-1) equiv 0$.
    $endgroup$
    – 0x539
    Jan 18 at 23:57












  • $begingroup$
    Hint: $(x!-!1,x!+!1) = (x!-!1,2)$ is coprime to odd primes $p,,$ so $,p^nmid (x!-!1)(x!+!1),Rightarrow,p^nmid x-1$ or $,p^nmid x+1 $
    $endgroup$
    – Bill Dubuque
    Jan 19 at 0:28












  • $begingroup$
    @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)$?
    $endgroup$
    – Wallace
    Jan 19 at 0:32












  • $begingroup$
    @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.
    $endgroup$
    – 0x539
    Jan 19 at 0:40








  • 1




    $begingroup$
    Cf. this question
    $endgroup$
    – J. W. Tanner
    Jan 20 at 17:01


















0












$begingroup$


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 1pmod n$ could be of some help but I couldn't get any further.










share|cite|improve this question











$endgroup$








  • 2




    $begingroup$
    $x equiv x^{-1}$ is equivalent to $x^2 - 1 equiv (x+1)(x-1) equiv 0$.
    $endgroup$
    – 0x539
    Jan 18 at 23:57












  • $begingroup$
    Hint: $(x!-!1,x!+!1) = (x!-!1,2)$ is coprime to odd primes $p,,$ so $,p^nmid (x!-!1)(x!+!1),Rightarrow,p^nmid x-1$ or $,p^nmid x+1 $
    $endgroup$
    – Bill Dubuque
    Jan 19 at 0:28












  • $begingroup$
    @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)$?
    $endgroup$
    – Wallace
    Jan 19 at 0:32












  • $begingroup$
    @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.
    $endgroup$
    – 0x539
    Jan 19 at 0:40








  • 1




    $begingroup$
    Cf. this question
    $endgroup$
    – J. W. Tanner
    Jan 20 at 17:01
















0












0








0


2



$begingroup$


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 1pmod n$ could be of some help but I couldn't get any further.










share|cite|improve this question











$endgroup$




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 1pmod n$ could be of some help but I couldn't get any further.







elementary-number-theory prime-numbers chinese-remainder-theorem






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 18 at 23:43









Bernard

121k740116




121k740116










asked Jan 18 at 23:29









WallaceWallace

1367




1367








  • 2




    $begingroup$
    $x equiv x^{-1}$ is equivalent to $x^2 - 1 equiv (x+1)(x-1) equiv 0$.
    $endgroup$
    – 0x539
    Jan 18 at 23:57












  • $begingroup$
    Hint: $(x!-!1,x!+!1) = (x!-!1,2)$ is coprime to odd primes $p,,$ so $,p^nmid (x!-!1)(x!+!1),Rightarrow,p^nmid x-1$ or $,p^nmid x+1 $
    $endgroup$
    – Bill Dubuque
    Jan 19 at 0:28












  • $begingroup$
    @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)$?
    $endgroup$
    – Wallace
    Jan 19 at 0:32












  • $begingroup$
    @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.
    $endgroup$
    – 0x539
    Jan 19 at 0:40








  • 1




    $begingroup$
    Cf. this question
    $endgroup$
    – J. W. Tanner
    Jan 20 at 17:01
















  • 2




    $begingroup$
    $x equiv x^{-1}$ is equivalent to $x^2 - 1 equiv (x+1)(x-1) equiv 0$.
    $endgroup$
    – 0x539
    Jan 18 at 23:57












  • $begingroup$
    Hint: $(x!-!1,x!+!1) = (x!-!1,2)$ is coprime to odd primes $p,,$ so $,p^nmid (x!-!1)(x!+!1),Rightarrow,p^nmid x-1$ or $,p^nmid x+1 $
    $endgroup$
    – Bill Dubuque
    Jan 19 at 0:28












  • $begingroup$
    @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)$?
    $endgroup$
    – Wallace
    Jan 19 at 0:32












  • $begingroup$
    @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.
    $endgroup$
    – 0x539
    Jan 19 at 0:40








  • 1




    $begingroup$
    Cf. this question
    $endgroup$
    – J. W. Tanner
    Jan 20 at 17:01










2




2




$begingroup$
$x equiv x^{-1}$ is equivalent to $x^2 - 1 equiv (x+1)(x-1) equiv 0$.
$endgroup$
– 0x539
Jan 18 at 23:57






$begingroup$
$x equiv x^{-1}$ is equivalent to $x^2 - 1 equiv (x+1)(x-1) equiv 0$.
$endgroup$
– 0x539
Jan 18 at 23:57














$begingroup$
Hint: $(x!-!1,x!+!1) = (x!-!1,2)$ is coprime to odd primes $p,,$ so $,p^nmid (x!-!1)(x!+!1),Rightarrow,p^nmid x-1$ or $,p^nmid x+1 $
$endgroup$
– Bill Dubuque
Jan 19 at 0:28






$begingroup$
Hint: $(x!-!1,x!+!1) = (x!-!1,2)$ is coprime to odd primes $p,,$ so $,p^nmid (x!-!1)(x!+!1),Rightarrow,p^nmid x-1$ or $,p^nmid x+1 $
$endgroup$
– Bill Dubuque
Jan 19 at 0:28














$begingroup$
@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)$?
$endgroup$
– Wallace
Jan 19 at 0:32






$begingroup$
@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)$?
$endgroup$
– Wallace
Jan 19 at 0:32














$begingroup$
@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.
$endgroup$
– 0x539
Jan 19 at 0:40






$begingroup$
@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.
$endgroup$
– 0x539
Jan 19 at 0:40






1




1




$begingroup$
Cf. this question
$endgroup$
– J. W. Tanner
Jan 20 at 17:01






$begingroup$
Cf. this question
$endgroup$
– J. W. Tanner
Jan 20 at 17:01












0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3078874%2fhow-many-solutions-does-x-equiv-x-1-pmod-n-have%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3078874%2fhow-many-solutions-does-x-equiv-x-1-pmod-n-have%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules