Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was just playing with the factorial and the modulo function. I just observed this interesting property. I was using a calculator

$$13!\equiv 13\times 12\pmod{169}\\ 17!\equiv 17\times 16\pmod{289}$$

It is easily verifiable that this works for $2,3,5,7,11$ also.

I conjecture that for any prime $p$, $$p!\equiv (p)\times (p-1)\pmod{p^2}$$

How does one go about proving it? and by the way is this well known or anything?

share|cite|improve this question

By Wilson's Theorem we have $(p-1)!\equiv -1\equiv p-1\pmod{p}$. Your conjectured result is obtained by multiplying through by $p$.

share|cite|improve this answer
    
How do you prove that the last operation is valid.(The one where you multiply everything by $p$). – fekaok 5 hours ago
    
Oh! It follows from the definition of the congruent modulo function. +1 – fekaok 5 hours ago
1  
Yes, it is very close to Wilson's Theorem. We have $p(p-1)!-p(p-1)$ is divisible by $p^2$ if and only if $(p-1)!-(p-1)$ is divisible by $p$. – André Nicolas 5 hours ago
1  
By the way, Leibniz was the first person to state the result that would later be called Wilson's Theorem. It is not known whether he had a proof. For sure Wilson did not! The first known proof is by Lagrange. – André Nicolas 5 hours ago
    
Its just funny to think that the theorem got named after Wilson. – fekaok 5 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.