Wilson Theorem: Solving (p-n+1) . (p-2)! + n–1 =0 (mod p)

  • Thread starter Thread starter papacy
  • Start date Start date
AI Thread Summary
The discussion focuses on proving the equation (p-n+1) . (p-2)! + n–1 = 0 (mod p) using Wilson's theorem, which states that (p-1)! ≡ -1 (mod p) for prime p. Participants suggest that to solve the equation, it is necessary to show that (p-n+1) . (p-2)! ≡ 0 (mod p) and n - 1 ≡ 0 (mod p). A key insight is that (p-2)! can be expressed as (p-1)!/(p-1), simplifying the equation to demonstrate that it holds true. The discussion concludes with acknowledgment of clever solutions and mentions the use of induction in solving the problem.
papacy
Messages
5
Reaction score
0
if p is prime and n is natural number, show that (p-n+1) . (p-2)! + n–1 =0 (mod p)

i think i have to show that (p-n+1) . (p-2)! = 0 (mod p) and n – 1 =0 (mod p)
using Wilson theorem
(p-1)!=-1(p)
 
Last edited:
Physics news on Phys.org
papacy said:
if p is prime and n is natural number, show that (p-n+1) . (p-2)! + n–1 =0 (mod p)

i think i have to show that (p-n+1) . (p-2)! = 0 (mod p) and n – 1 =0 (mod p)
using Wilson theorem
(p-1)!=-1(p)



Well, of course \,n-1\neq 0\pmod p\, almost always. Working modulo p in the following:

$$(p-2)!=\frac{(p-1)!}{p-1}=\frac{-1}{-1}=1\Longrightarrow (p-n+1)(p-2)!+n-1=(-n+1)\cdot 1+n-1=-n+1+n-1=0$$

DonAntonio
 
DonAntonio said:
Well, of course \,n-1\neq 0\pmod p\, almost always. Working modulo p in the following:

$$(p-2)!=\frac{(p-1)!}{p-1}=\frac{-1}{-1}=1\Longrightarrow (p-n+1)(p-2)!+n-1=(-n+1)\cdot 1+n-1=-n+1+n-1=0$$

DonAntonio

thanks a lot.
very clever.
also i solve it inductances
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks
Back
Top