2

This theorem is the converse of Wilson's theorem:

If $n$ is composite and $n>4$, then $(n-1)! \equiv 0 \pmod n$

The question holds up for all the composites I have tried but I'm struggling to form a proof for all composites greater than $4$.

4 Answers4

6

If $n$ is composite, then there are $1<a<b<n$ with $ab=n$, unless $n=p^2$ is the square of a prime. In the first case, $a$ and $b$ appear in the product $(n-1)!$ thus $n|(n-1)!$. In the second case, your hypothesis $n>4$ implies $p\geq 3$ and thus $1<p<2p<n-1$ so that $2n=p\times 2p$ divides $(n-1)!$.

2

Suppose first that there exist integers $a$ and $b$, such that $1\lt a\lt b\le n-1$ and $ab=n$. Then since $b\le n-1$, it follows that $ab$ divides $(n-1)!$. For each of $a$ and $b$ appears among the numbers from $1$ to $n-1$.

But $n$ can be composite without meeting the above condition: It could be that the only proper factorizations of $n$ have the shape $n=a^2$. (This only happens if $a$ is prime.) In that case, if $a\ne 2$, then $a$ and $2a$ are both $\le n-1$. So $2a^2$ divides $(n-1)!$, and therefore $a^2$ divides $(n-1)!$.

André Nicolas
  • 507,029
0

Notice first that

Suppose $p$ is prime and $p\mid n$. Since $n$ is composite, we have $p<n$, so $p\le n-1$.

The multiplicity of the prime factor $p$ in the the factorization of $n$ is the largest integer $k$ such that $p^k\mid n$. Thus $p,p^2,p^3,\ldots,p^{k-1}$ divide $n$ and are all less than $n$. We have $$ (n-1)! = (n-1)(n-2)(n-3) \cdots 3\cdot2\cdot1. $$ The numbers $p$ and $p^{k-1}$ are both in this string of numbers from $1$ to $n-1$, so the product is divisible by $p\cdot p^{k-1} = p^k$. And $p^k$ itself is in that string of numbers unless $p^k=n$. Either way, $p^k\mid n.$

This is true of all prime numbers that divide $n$, and thus it is true of the product of those powers of primes, and the product is $n$. So $n$ is a divisor of $(n-1)!.$

Revised postscript: As Bill Dubuque points out in comments $4$ is not a divisor of $(4-1)! = 6$. The problem is this: although $p=2$ and $p^{k-1}=2^{2-1} =2 $ are both in this string of numbers, in this case $p$ and $p^{k-1}$ are both the same number, namely $p$. This happens whenever $p$ and $p^{k-1}$ are both the same number, i.e. when $p^{k-1} = p^1$ so that $k=1.$ So we can't conclude that $p\times p^{k-1}$ divides $(n-1)!$ by that same method in that case.

However, the result can be proved by another method when $k=1$ and $p>2$: Observe that $p$ and $2p$ are both divisors of $(n-1)!$, so $p^k=p^2\mid (n-1)!.$ That doesn't work when $p=2$ because in that case $2p$ is $n$ itself rather than some number less than $n$.

  • I have been trying to use this approach, but have been unable to produce a proof. Could you please elaborate? – Student Nov 04 '16 at 15:47
  • ok, Suppose $n=60$. Then $n = 2 \times 2\times3\times5$. The primes that divide $60$ are $2$, $3$, and $5$. So you have $$ 59! = 1\times 2\times 3\times 4 \times 5\times \cdots\times59.$$The prime numbers that divide $60$, namely $2$, $3$, and $5$ are all in this factorization of $59!$ because, since $60$ is not prime, all of them are less than or equal to $59$. And the one that appears more than once, namely $2$, appears more than once is the factorization of $59!$. So $2\times2\times3\times5$ is present in the factorization of $59!$, so $60$ divides $59!.\qquad$ – Michael Hardy Nov 04 '16 at 16:47
  • 1
    @MichaelHardy I think you should give more details in your answer. Even I cannot infer precisely which proof you have in mind. One could give the same answer for any divisibility problem, so it does not say much about this particular problem. – Bill Dubuque Nov 04 '16 at 19:30
  • @ShreyAryan : I've rearranged the answer somewhat. $\qquad$ – Michael Hardy Nov 04 '16 at 22:56
  • @MichaelHardy : Thank you! The edited answer is much more understandable. – Student Nov 05 '16 at 18:03
  • @Shrey The proof is incorrect. You might find it instructive to try to locate the error. – Bill Dubuque Nov 05 '16 at 21:56
  • It seems fine to me. Could you give a hint. – Student Nov 05 '16 at 22:01
  • I mean $p$ is an arbitrary prime divisor of $n$. – Student Nov 05 '16 at 22:01
  • @Shrey Hint: the hypothesis $n>4$ is necessary since $,4\nmid 3!.,$ But the proof never uses this hypothesis. So it cannot be correct. When you track down the error you will find that the proof fails for infinitely many integers. But it is not too difficult to remedy. – Bill Dubuque Nov 06 '16 at 19:16
  • @BillDubuque : I've added a postscript that boldly says: "there's no problem with this argument when $n>4$." You seem to say that's wrong. So maybe we're not done here yet. $\qquad$ – Michael Hardy Nov 06 '16 at 21:25
  • Generally, it fails for $n = p^2$, Michael. For $n = p^2$ with $p > 2$, use $p$ and $2p$. – Daniel Fischer Nov 06 '16 at 21:31
  • @MichaelHardy That's the error I hinted at. But as I mentioned, it occurs not only for $4$ but for infinitely many integers, viz. $, n = p^2.\ $ Update: Daniel has pointed that out too, along with the obvious fix for this case (his comment hd not yet appeared here when I first posted this comment). – Bill Dubuque Nov 06 '16 at 21:34
  • @BillDubuque : ok, I think I've got everything fixed now. – Michael Hardy Nov 07 '16 at 15:17
  • 1
    @MichaelHardy yes, and in hindsight you can see that such a case-based proof is in fact simpler without using primes, i.e. if $, n = ab,$ then wlog either $ a < b$ and both occur as factors, or $,a = b,$ and then $,a,2a,$ occur as factors. I didn't think you intended that proof because primes are not needed. Hence my prior comment about not being able to guess what you had in mind. One should not have to guess. Proofs should be clear enough to avoid having to guess. – Bill Dubuque Nov 07 '16 at 15:29
  • In any case, kudos to you for describing the debugging process in the answer since it will serve as a very instructive example to students. I thought that might happen in the comments after my hint, but certainly it gets better exposure in the answer. – Bill Dubuque Nov 07 '16 at 15:37
0

If $n=pq$, try to prove that $pq$ divides $(n-1)!$

ajotatxe
  • 65,084