How to prove that $p! (mod p^2) = p(p-1) $question about congruencesHow can I find $x$ such that $ax equiv 1 pmodbx+c$, given $a,b,c$?prove a=b (mod n) then ra=rb(mod n)Demostrating that a number x is the smallest such that 24x mod (59) = 2 mod (59)Intuition behind modular arithmetic $21z equiv 3 mod 16 iff 5z equiv 3 mod 16$If $a^p-1 equiv 1 pmod p$ and then $a^fracp-12 equiv 1$ or $p-1 pmod p$?Is this possible to solve through algebra?How does modular arithmetic work - Fermat's last theorem near misses?Prove that $(t$ mod $N) $ mod $ p = (t$ mod $p)$About Congruences of $fracabmod n$
How to add theme from github with composer
I am the person who abides by rules but breaks the rules . Who am I
Why does this boat have a landing pad? (SpaceX's GO Searcher) Any plans for propulsive capsule landings?
Why does a car's steering wheel get lighter with increasing speed
Paper published similar to PhD thesis
If nine coins are tossed, what is the probability that the number of heads is even?
Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?
How to educate team mate to take screenshots for bugs with out unwanted stuff
Is it a Cyclops number? "Nobody" knows!
Why is my explanation wrong?
How can I portion out frozen cookie dough?
What is Tony Stark injecting into himself in Iron Man 3?
EXM headers adding bounce@spe.sitecoremail.com as the sender
An Undercover Army
How do you make a gun that shoots melee weapons and/or swords?
Can I challenge the interviewer to give me a proper technical feedback?
Why would /etc/passwd be used every time someone executes `ls -l` command?
How to recover against Snake as a heavyweight character?
Too soon for a plot twist?
Generating a list with duplicate entries
What is better: yes / no radio, or simple checkbox?
Geological Explanation for an Unusually Temperate Northern Mountain Valley
Having the player face themselves after the mid-game
Are small insurances worth it?
How to prove that $p! (mod p^2) = p(p-1) $
question about congruencesHow can I find $x$ such that $ax equiv 1 pmodbx+c$, given $a,b,c$?prove a=b (mod n) then ra=rb(mod n)Demostrating that a number x is the smallest such that 24x mod (59) = 2 mod (59)Intuition behind modular arithmetic $21z equiv 3 mod 16 iff 5z equiv 3 mod 16$If $a^p-1 equiv 1 pmod p$ and then $a^fracp-12 equiv 1$ or $p-1 pmod p$?Is this possible to solve through algebra?How does modular arithmetic work - Fermat's last theorem near misses?Prove that $(t$ mod $N) $ mod $ p = (t$ mod $p)$About Congruences of $fracabmod n$
$begingroup$
While doing my Math homework about Modular arithmetic. I accidentally found this
$p!equiv p(p-1)pmodp^2$
It's help me save time to find $ 21! (mod 361) $ a lot.
The question is how can I prove an equation above . Thank you in advance.
number-theory prime-numbers modular-arithmetic
$endgroup$
add a comment |
$begingroup$
While doing my Math homework about Modular arithmetic. I accidentally found this
$p!equiv p(p-1)pmodp^2$
It's help me save time to find $ 21! (mod 361) $ a lot.
The question is how can I prove an equation above . Thank you in advance.
number-theory prime-numbers modular-arithmetic
$endgroup$
2
$begingroup$
Wilson's theorem will get you most of the way
$endgroup$
– Henry
13 hours ago
1
$begingroup$
Also note that your formula can be simplified: $p(p-1)=p^2-pequiv -p pmodp^2$. But pay attention: the equation holds if and only if $p$ is a prime number!
$endgroup$
– AlessioDV
13 hours ago
add a comment |
$begingroup$
While doing my Math homework about Modular arithmetic. I accidentally found this
$p!equiv p(p-1)pmodp^2$
It's help me save time to find $ 21! (mod 361) $ a lot.
The question is how can I prove an equation above . Thank you in advance.
number-theory prime-numbers modular-arithmetic
$endgroup$
While doing my Math homework about Modular arithmetic. I accidentally found this
$p!equiv p(p-1)pmodp^2$
It's help me save time to find $ 21! (mod 361) $ a lot.
The question is how can I prove an equation above . Thank you in advance.
number-theory prime-numbers modular-arithmetic
number-theory prime-numbers modular-arithmetic
edited 13 hours ago
Fabio Lucchini
8,66311426
8,66311426
asked 13 hours ago
ABCDEFG user157844ABCDEFG user157844
454310
454310
2
$begingroup$
Wilson's theorem will get you most of the way
$endgroup$
– Henry
13 hours ago
1
$begingroup$
Also note that your formula can be simplified: $p(p-1)=p^2-pequiv -p pmodp^2$. But pay attention: the equation holds if and only if $p$ is a prime number!
$endgroup$
– AlessioDV
13 hours ago
add a comment |
2
$begingroup$
Wilson's theorem will get you most of the way
$endgroup$
– Henry
13 hours ago
1
$begingroup$
Also note that your formula can be simplified: $p(p-1)=p^2-pequiv -p pmodp^2$. But pay attention: the equation holds if and only if $p$ is a prime number!
$endgroup$
– AlessioDV
13 hours ago
2
2
$begingroup$
Wilson's theorem will get you most of the way
$endgroup$
– Henry
13 hours ago
$begingroup$
Wilson's theorem will get you most of the way
$endgroup$
– Henry
13 hours ago
1
1
$begingroup$
Also note that your formula can be simplified: $p(p-1)=p^2-pequiv -p pmodp^2$. But pay attention: the equation holds if and only if $p$ is a prime number!
$endgroup$
– AlessioDV
13 hours ago
$begingroup$
Also note that your formula can be simplified: $p(p-1)=p^2-pequiv -p pmodp^2$. But pay attention: the equation holds if and only if $p$ is a prime number!
$endgroup$
– AlessioDV
13 hours ago
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Warning ! You statement is true only when $n$ is prime. For example for $n=4$, you don't have $n! = n(n-1) quad (mathrmmod text n^2)$. So I guess you can't use it with $21$ ("by hand", you can see that $21!=323 neq 21times 20 quad (mathrmmod text 361)$).
Proof when $n$ is prime :
By Wilson's theorem,
$$(p-1)! = -1 quad (mathrmmod text p)$$
Multiplying by $p$, this implies
$$p! = -p quad (mathrmmod text p^2)$$
i.e.
$$p! = p^2-p = p(p-1) quad (mathrmmod text p^2)$$
$endgroup$
$begingroup$
I never knew that we can multiply p throughout the whole equation including (mod p) , that's my truly open-eyed indeed. Wonderful! Thank you.
$endgroup$
– ABCDEFG user157844
13 hours ago
$begingroup$
Well, $a=b quad (mathrmmod text p)$ means that there exists $n$ such that $a-b = pn$. So multiplying by any number $q$, you get $aq-bq=pqn$, so $aq=bq quad (mathrmmod text pq)$.
$endgroup$
– TheSilverDoe
13 hours ago
$begingroup$
Can we avoid to using Chinese remainder theorem by this principle?
$endgroup$
– ABCDEFG user157844
12 hours ago
1
$begingroup$
No, I don't think so, Chinese remainder theorem helps to solve a system of congruence equations. It does not consist in just algebraic modifications of one equality.
$endgroup$
– TheSilverDoe
12 hours ago
add a comment |
$begingroup$
Wilson's Theorem states that:
$(p-1)! = -1 (mod p^2)$ ......(a)
and
$p!=p(p-1)!$, $-1=p-1(mod p^2)$ .......(b)
applying (b) to (a), we have
$p!=p(p-1)!=p*-1 (mod p^2)$
which implies that
$p!=p(p-1) (mod p^2)$
Note that the $p$ above stands for prime numbers and $21$ is not a prime number since $21=3*7$. Therefore the above statements will not apply, but take for example, 5 is a prime number and
$5!=5*4*3*2*1=120=5(5-1)=20 (mod 25)$
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
$$p! equiv p(p-1) pmodp^2 Leftrightarrow p^2 mid p!-p(p-1) Leftrightarrow p mid (p-1)!-(p-1) Leftrightarrow (p-1)! equiv -1 pmodp$$
If $p$ is a prime, then except for the two solutions of $x^2 equiv 1 pmodp$ (which are equal $pmodp$ for $p=2$), we can pair the numbers in $2, ... (p-2)$ in pairs $(x,y)$ with $x notequiv y pmodp$ such that $xy equiv 1 pmodp$, so $(p-2)! equiv 1 pmodp$ and so $(p-1)! equiv (p-1)(p-2)! equiv (p-1) equiv -1 pmodp$.
$endgroup$
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3139955%2fhow-to-prove-that-p-mod-p2-pp-1%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Warning ! You statement is true only when $n$ is prime. For example for $n=4$, you don't have $n! = n(n-1) quad (mathrmmod text n^2)$. So I guess you can't use it with $21$ ("by hand", you can see that $21!=323 neq 21times 20 quad (mathrmmod text 361)$).
Proof when $n$ is prime :
By Wilson's theorem,
$$(p-1)! = -1 quad (mathrmmod text p)$$
Multiplying by $p$, this implies
$$p! = -p quad (mathrmmod text p^2)$$
i.e.
$$p! = p^2-p = p(p-1) quad (mathrmmod text p^2)$$
$endgroup$
$begingroup$
I never knew that we can multiply p throughout the whole equation including (mod p) , that's my truly open-eyed indeed. Wonderful! Thank you.
$endgroup$
– ABCDEFG user157844
13 hours ago
$begingroup$
Well, $a=b quad (mathrmmod text p)$ means that there exists $n$ such that $a-b = pn$. So multiplying by any number $q$, you get $aq-bq=pqn$, so $aq=bq quad (mathrmmod text pq)$.
$endgroup$
– TheSilverDoe
13 hours ago
$begingroup$
Can we avoid to using Chinese remainder theorem by this principle?
$endgroup$
– ABCDEFG user157844
12 hours ago
1
$begingroup$
No, I don't think so, Chinese remainder theorem helps to solve a system of congruence equations. It does not consist in just algebraic modifications of one equality.
$endgroup$
– TheSilverDoe
12 hours ago
add a comment |
$begingroup$
Warning ! You statement is true only when $n$ is prime. For example for $n=4$, you don't have $n! = n(n-1) quad (mathrmmod text n^2)$. So I guess you can't use it with $21$ ("by hand", you can see that $21!=323 neq 21times 20 quad (mathrmmod text 361)$).
Proof when $n$ is prime :
By Wilson's theorem,
$$(p-1)! = -1 quad (mathrmmod text p)$$
Multiplying by $p$, this implies
$$p! = -p quad (mathrmmod text p^2)$$
i.e.
$$p! = p^2-p = p(p-1) quad (mathrmmod text p^2)$$
$endgroup$
$begingroup$
I never knew that we can multiply p throughout the whole equation including (mod p) , that's my truly open-eyed indeed. Wonderful! Thank you.
$endgroup$
– ABCDEFG user157844
13 hours ago
$begingroup$
Well, $a=b quad (mathrmmod text p)$ means that there exists $n$ such that $a-b = pn$. So multiplying by any number $q$, you get $aq-bq=pqn$, so $aq=bq quad (mathrmmod text pq)$.
$endgroup$
– TheSilverDoe
13 hours ago
$begingroup$
Can we avoid to using Chinese remainder theorem by this principle?
$endgroup$
– ABCDEFG user157844
12 hours ago
1
$begingroup$
No, I don't think so, Chinese remainder theorem helps to solve a system of congruence equations. It does not consist in just algebraic modifications of one equality.
$endgroup$
– TheSilverDoe
12 hours ago
add a comment |
$begingroup$
Warning ! You statement is true only when $n$ is prime. For example for $n=4$, you don't have $n! = n(n-1) quad (mathrmmod text n^2)$. So I guess you can't use it with $21$ ("by hand", you can see that $21!=323 neq 21times 20 quad (mathrmmod text 361)$).
Proof when $n$ is prime :
By Wilson's theorem,
$$(p-1)! = -1 quad (mathrmmod text p)$$
Multiplying by $p$, this implies
$$p! = -p quad (mathrmmod text p^2)$$
i.e.
$$p! = p^2-p = p(p-1) quad (mathrmmod text p^2)$$
$endgroup$
Warning ! You statement is true only when $n$ is prime. For example for $n=4$, you don't have $n! = n(n-1) quad (mathrmmod text n^2)$. So I guess you can't use it with $21$ ("by hand", you can see that $21!=323 neq 21times 20 quad (mathrmmod text 361)$).
Proof when $n$ is prime :
By Wilson's theorem,
$$(p-1)! = -1 quad (mathrmmod text p)$$
Multiplying by $p$, this implies
$$p! = -p quad (mathrmmod text p^2)$$
i.e.
$$p! = p^2-p = p(p-1) quad (mathrmmod text p^2)$$
edited 13 hours ago
answered 13 hours ago
TheSilverDoeTheSilverDoe
3,220112
3,220112
$begingroup$
I never knew that we can multiply p throughout the whole equation including (mod p) , that's my truly open-eyed indeed. Wonderful! Thank you.
$endgroup$
– ABCDEFG user157844
13 hours ago
$begingroup$
Well, $a=b quad (mathrmmod text p)$ means that there exists $n$ such that $a-b = pn$. So multiplying by any number $q$, you get $aq-bq=pqn$, so $aq=bq quad (mathrmmod text pq)$.
$endgroup$
– TheSilverDoe
13 hours ago
$begingroup$
Can we avoid to using Chinese remainder theorem by this principle?
$endgroup$
– ABCDEFG user157844
12 hours ago
1
$begingroup$
No, I don't think so, Chinese remainder theorem helps to solve a system of congruence equations. It does not consist in just algebraic modifications of one equality.
$endgroup$
– TheSilverDoe
12 hours ago
add a comment |
$begingroup$
I never knew that we can multiply p throughout the whole equation including (mod p) , that's my truly open-eyed indeed. Wonderful! Thank you.
$endgroup$
– ABCDEFG user157844
13 hours ago
$begingroup$
Well, $a=b quad (mathrmmod text p)$ means that there exists $n$ such that $a-b = pn$. So multiplying by any number $q$, you get $aq-bq=pqn$, so $aq=bq quad (mathrmmod text pq)$.
$endgroup$
– TheSilverDoe
13 hours ago
$begingroup$
Can we avoid to using Chinese remainder theorem by this principle?
$endgroup$
– ABCDEFG user157844
12 hours ago
1
$begingroup$
No, I don't think so, Chinese remainder theorem helps to solve a system of congruence equations. It does not consist in just algebraic modifications of one equality.
$endgroup$
– TheSilverDoe
12 hours ago
$begingroup$
I never knew that we can multiply p throughout the whole equation including (mod p) , that's my truly open-eyed indeed. Wonderful! Thank you.
$endgroup$
– ABCDEFG user157844
13 hours ago
$begingroup$
I never knew that we can multiply p throughout the whole equation including (mod p) , that's my truly open-eyed indeed. Wonderful! Thank you.
$endgroup$
– ABCDEFG user157844
13 hours ago
$begingroup$
Well, $a=b quad (mathrmmod text p)$ means that there exists $n$ such that $a-b = pn$. So multiplying by any number $q$, you get $aq-bq=pqn$, so $aq=bq quad (mathrmmod text pq)$.
$endgroup$
– TheSilverDoe
13 hours ago
$begingroup$
Well, $a=b quad (mathrmmod text p)$ means that there exists $n$ such that $a-b = pn$. So multiplying by any number $q$, you get $aq-bq=pqn$, so $aq=bq quad (mathrmmod text pq)$.
$endgroup$
– TheSilverDoe
13 hours ago
$begingroup$
Can we avoid to using Chinese remainder theorem by this principle?
$endgroup$
– ABCDEFG user157844
12 hours ago
$begingroup$
Can we avoid to using Chinese remainder theorem by this principle?
$endgroup$
– ABCDEFG user157844
12 hours ago
1
1
$begingroup$
No, I don't think so, Chinese remainder theorem helps to solve a system of congruence equations. It does not consist in just algebraic modifications of one equality.
$endgroup$
– TheSilverDoe
12 hours ago
$begingroup$
No, I don't think so, Chinese remainder theorem helps to solve a system of congruence equations. It does not consist in just algebraic modifications of one equality.
$endgroup$
– TheSilverDoe
12 hours ago
add a comment |
$begingroup$
Wilson's Theorem states that:
$(p-1)! = -1 (mod p^2)$ ......(a)
and
$p!=p(p-1)!$, $-1=p-1(mod p^2)$ .......(b)
applying (b) to (a), we have
$p!=p(p-1)!=p*-1 (mod p^2)$
which implies that
$p!=p(p-1) (mod p^2)$
Note that the $p$ above stands for prime numbers and $21$ is not a prime number since $21=3*7$. Therefore the above statements will not apply, but take for example, 5 is a prime number and
$5!=5*4*3*2*1=120=5(5-1)=20 (mod 25)$
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
Wilson's Theorem states that:
$(p-1)! = -1 (mod p^2)$ ......(a)
and
$p!=p(p-1)!$, $-1=p-1(mod p^2)$ .......(b)
applying (b) to (a), we have
$p!=p(p-1)!=p*-1 (mod p^2)$
which implies that
$p!=p(p-1) (mod p^2)$
Note that the $p$ above stands for prime numbers and $21$ is not a prime number since $21=3*7$. Therefore the above statements will not apply, but take for example, 5 is a prime number and
$5!=5*4*3*2*1=120=5(5-1)=20 (mod 25)$
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
Wilson's Theorem states that:
$(p-1)! = -1 (mod p^2)$ ......(a)
and
$p!=p(p-1)!$, $-1=p-1(mod p^2)$ .......(b)
applying (b) to (a), we have
$p!=p(p-1)!=p*-1 (mod p^2)$
which implies that
$p!=p(p-1) (mod p^2)$
Note that the $p$ above stands for prime numbers and $21$ is not a prime number since $21=3*7$. Therefore the above statements will not apply, but take for example, 5 is a prime number and
$5!=5*4*3*2*1=120=5(5-1)=20 (mod 25)$
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
Wilson's Theorem states that:
$(p-1)! = -1 (mod p^2)$ ......(a)
and
$p!=p(p-1)!$, $-1=p-1(mod p^2)$ .......(b)
applying (b) to (a), we have
$p!=p(p-1)!=p*-1 (mod p^2)$
which implies that
$p!=p(p-1) (mod p^2)$
Note that the $p$ above stands for prime numbers and $21$ is not a prime number since $21=3*7$. Therefore the above statements will not apply, but take for example, 5 is a prime number and
$5!=5*4*3*2*1=120=5(5-1)=20 (mod 25)$
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 13 hours ago
Goodness ThankyouGoodness Thankyou
11
11
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Goodness Thankyou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
$begingroup$
$$p! equiv p(p-1) pmodp^2 Leftrightarrow p^2 mid p!-p(p-1) Leftrightarrow p mid (p-1)!-(p-1) Leftrightarrow (p-1)! equiv -1 pmodp$$
If $p$ is a prime, then except for the two solutions of $x^2 equiv 1 pmodp$ (which are equal $pmodp$ for $p=2$), we can pair the numbers in $2, ... (p-2)$ in pairs $(x,y)$ with $x notequiv y pmodp$ such that $xy equiv 1 pmodp$, so $(p-2)! equiv 1 pmodp$ and so $(p-1)! equiv (p-1)(p-2)! equiv (p-1) equiv -1 pmodp$.
$endgroup$
add a comment |
$begingroup$
$$p! equiv p(p-1) pmodp^2 Leftrightarrow p^2 mid p!-p(p-1) Leftrightarrow p mid (p-1)!-(p-1) Leftrightarrow (p-1)! equiv -1 pmodp$$
If $p$ is a prime, then except for the two solutions of $x^2 equiv 1 pmodp$ (which are equal $pmodp$ for $p=2$), we can pair the numbers in $2, ... (p-2)$ in pairs $(x,y)$ with $x notequiv y pmodp$ such that $xy equiv 1 pmodp$, so $(p-2)! equiv 1 pmodp$ and so $(p-1)! equiv (p-1)(p-2)! equiv (p-1) equiv -1 pmodp$.
$endgroup$
add a comment |
$begingroup$
$$p! equiv p(p-1) pmodp^2 Leftrightarrow p^2 mid p!-p(p-1) Leftrightarrow p mid (p-1)!-(p-1) Leftrightarrow (p-1)! equiv -1 pmodp$$
If $p$ is a prime, then except for the two solutions of $x^2 equiv 1 pmodp$ (which are equal $pmodp$ for $p=2$), we can pair the numbers in $2, ... (p-2)$ in pairs $(x,y)$ with $x notequiv y pmodp$ such that $xy equiv 1 pmodp$, so $(p-2)! equiv 1 pmodp$ and so $(p-1)! equiv (p-1)(p-2)! equiv (p-1) equiv -1 pmodp$.
$endgroup$
$$p! equiv p(p-1) pmodp^2 Leftrightarrow p^2 mid p!-p(p-1) Leftrightarrow p mid (p-1)!-(p-1) Leftrightarrow (p-1)! equiv -1 pmodp$$
If $p$ is a prime, then except for the two solutions of $x^2 equiv 1 pmodp$ (which are equal $pmodp$ for $p=2$), we can pair the numbers in $2, ... (p-2)$ in pairs $(x,y)$ with $x notequiv y pmodp$ such that $xy equiv 1 pmodp$, so $(p-2)! equiv 1 pmodp$ and so $(p-1)! equiv (p-1)(p-2)! equiv (p-1) equiv -1 pmodp$.
answered 12 hours ago
Wolfgang KaisWolfgang Kais
6715
6715
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3139955%2fhow-to-prove-that-p-mod-p2-pp-1%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
$begingroup$
Wilson's theorem will get you most of the way
$endgroup$
– Henry
13 hours ago
1
$begingroup$
Also note that your formula can be simplified: $p(p-1)=p^2-pequiv -p pmodp^2$. But pay attention: the equation holds if and only if $p$ is a prime number!
$endgroup$
– AlessioDV
13 hours ago