1

The question is to prove the following:

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

My attempt to prove so is the following:

Since $n$ is not prime, the prime factors of $n$ lies in $(n-1)!$ yielding a term of $kn$ for some integer $k$. Hence, it is divisible by $n$ as desired.

The proof seems too short, did I prove it correctly?

Maged Saeed
  • 1,140
  • 1
    Why is $(n-1)!=kn$? This is what we need to prove. – Dietrich Burde Oct 31 '18 at 13:26
  • I mean that $(n-1)! = kn$ for some integer $k$. – Maged Saeed Oct 31 '18 at 13:27
  • $n=7$ is prime. $n$ shall be composite. – Maged Saeed Oct 31 '18 at 13:29
  • @DietrichBurde, please read the post carefully. – Maged Saeed Oct 31 '18 at 13:30
  • suppose that $p_1,p_2 .. p_n$ are the prime factors of $n$, then $(n-1)! = (n-1)(n-2)...p_n .. p_{n-1} ... p_2 ... p_1 ... 2.1$. but $(p_n)(p_{n-1})..(p_1) = n$. Hence $(n-1)! = [(p_n)(p_{n-1})..(p_1) = n]\times k$ where $k$ are the remaining terms. – Maged Saeed Oct 31 '18 at 13:33
  • I hope that I made it clear now. – Maged Saeed Oct 31 '18 at 13:35
  • @DietrichBurde, thanks for the reference to the duplicate. – Maged Saeed Oct 31 '18 at 13:36
  • 1
    What if $n$ has prime factors to a certain power ? (e.g. why doesn't your proof work for $n= 4$ ? ) – Maxime Ramzi Oct 31 '18 at 13:39
  • 1
    Let us assume $n$ composite and take $q_1,q_2,\dots$ the maximal (pairwise distinct / relatively prime) prime powers in the factor decomposition of $n$. Then they occur at different places in the product defining $n!$. Well if $n=q_1$... – dan_fulea Oct 31 '18 at 13:40
  • @Max you have posed an excellent point. I shall take care and try to modify. – Maged Saeed Oct 31 '18 at 13:43
  • @dan_fulea I did not understand your point clearly. could you elaborate more,, – Maged Saeed Oct 31 '18 at 13:44
  • Let us take an example. $n= 2^8\cdot 3^7\cdot 2017$. Then among the explicit factors $1,2,3,4,5,\dots,(n-1)$ in $(n-1)!$ we have at distinct places all three prime power factors $2^8\ , 3^7\ , 2017$ of $n$. Things should be clear now. This is "almost a proof", but we have to consider explicitly the case when there are not at least two prime power factors in $n$. For instance $n=3^7$. The same argument does not work any longer. But consider now $3$ and $3^6$. (They are at different places in the list.) The same argument works for all $p^s$ with $s>2$. Now for $s=1,2$... – dan_fulea Oct 31 '18 at 13:50

1 Answers1

1

Suppose first that $n=p^k$ for some odd prime $p$ and positive integer $k\ge 2$. Then you see that $p^{k-1},\dots,(p-1) p^{k-1}$ all contribute with a factor $p^{k-1}$ to the power of $p$ dividing $(p^k-1)!$. Then $(p-1)(k-1)\ge k$ because $k\ge 2\ge (p-1)/(p-2)$. So $p^k$ divides $(p^k-1)!$.

If $n=2^k$, with $k\ge 3$, then every even number between $1$ and $2^k-1$ contributes with at least a factor $2$ and $4<2^k-1$ contributes with an additional factor $2$. Therefore the exponent of the power of $2$ dividing $(2^k-1)!$ is at least $2^{k-1}+1\ge k$. So $2^k$ divides $(2^k-1)!$.

Finally, if $n$ has at least two different prime factors, and $p^k$ is the highest power of $p$ dividing $n$, then $p^k\le n-1$, so the claim is trivial in this case.