2

I have been playing around with numbers such as factorials. I noticed that factorials for $n> 1$, are even numbers and for $n \geqslant 5$, we have that factorials end in at least one zero. Because $2 \cdot 5$ is $10$. So if one defines $t= n! - 1$, I noticed that t seems to be prime based on doing computation of $n= 3$ to $n = 12$. Just wondering if there is a way to show that $n! - 1$ is prime for $n \geqslant 3$.

user1337
  • 24,381
Palu
  • 841
  • 2
    Your conjecture is false: $5!-1 = 7 \cdot 17$, $8!-1=23 \cdot 1753$, etc. – Kieren MacMillan Oct 26 '17 at 04:06
  • Not to mention that $8!-1=23\times1753$, that $9!=11^2\times2999$, that $10!-1=29\times125131$, and so on. – José Carlos Santos Oct 26 '17 at 04:08
  • 1
    See https://oeis.org/A002982 for a list of $n$ such that $n! - 1$ is prime. – Kieren MacMillan Oct 26 '17 at 04:08
  • 1
    You are able to guarantee that $n!-1$ is not divisible by any prime less than or equal to $n$, but as mentioned already you cannot make such a claim about primes larger than $n$. – JMoravitz Oct 26 '17 at 04:19
  • OK, its seems i have made a mistake. I did 5! -1, and thought that 119 was prime. I then tried some others and looked them up in a list of primes, those were correct. SO i made some mistakes in a particular order that made it seem it was. Thanks for checking the computations. – Palu Oct 26 '17 at 04:41
  • "I then tried some others and looked them up in a list of primes, those were correct". You must have been making some sort of systemic mistake. Because none of $8!-1$, $9!-1$, $10!-1$, or $11!-1$ are prime, and you tried up to $n=12$. – 2'5 9'2 Oct 26 '17 at 05:00
  • YES, like I have said, this was a major brain failure on my part. I admit major failure on my side here. I should have rechecked things. – Palu Oct 26 '17 at 05:05
  • I guess that is just life. You make some failures and try to move on. – Palu Oct 26 '17 at 05:07
  • @KierenMacMillan Do we know that

    sequence oeis.org/A002982 is infinite?

    – Widawensen Oct 26 '17 at 09:18
  • @Widawensen: I believe that’s an open problem. – Kieren MacMillan Oct 26 '17 at 13:20
  • I have seen this oeis.org/A002982 sequence briefly. This is very interesting how patterns can arise out of different things. Like the way that Pascals triangle has so many patterns within it. Its is interesting how primes are involved so many places. – Palu Oct 26 '17 at 14:30

4 Answers4

3

Since $n!-1$ is relatively prime to $n!$, and $n!$ is divisible by all primes less than or equal to $n$, then none of those primes are going to divide $n!-1$.

But primes larger than $n$ might divide $n!-1$. For example, $7$ divides $5!-1$.

2'5 9'2
  • 54,717
  • Hi Alex, you make a statement that n!-1 is relatively prime to n!. OK so you are saying that since n! is divisible by all numbers less than or equal to n. Then because n! - 1 is greater than n, that means none of the factors of n!-1 would divide into n! How do we know that. How do we know that n!-1 does not contain of of the factors of less than or equal to n. That is , if we prime factored n!-1 into unique prime factors, how would you know that it would not have the numbers less than or equal to n. – Palu Oct 26 '17 at 04:46
  • @Palu No mistake. With any integer $x$, the numbers $x$ and $x-1$ are relatively prime. I'm just applying that to $x=n!$. – 2'5 9'2 Oct 26 '17 at 04:56
  • OK, I think I got you. SO since these two numbers, are consecutive numbers then that means n!-1 won't divide into n!. – Palu Oct 26 '17 at 04:58
  • 1
    So even if we factored n!-1 into prime factors, none of those would divide into n! either. – Palu Oct 26 '17 at 05:01
2

This is not true, as Kieren points out $5!-1$ is not prime. But your observation is something along the lines of the proof for why there must be an infinite number of primes posed by Euclid.

If there were finitely many primes, $p_1, p_2, \ldots p_n$, then you could consider the number $N=p_1 \cdot p_2 \cdots p_n +1$ and it would be prime since no primes divide it. But $N$ is not in the list of all the primes as it is larger than $p_n$ the largest prime. Thus there must be infinitely many primes.

CPM
  • 3,860
  • 17
  • 23
1

(p-2)!− 1 is always divisible by p for p prime and larger than 2 as a corollary of Wilson's theorem. (p-2)!− 1 = 0 if p = 3, 5 if p = 5, and cannot be prime for p greater than 7 since (p-2)!− 1 will be greater than and divisible by p.

0

You saw that it was true for $n=3$. You saw that it was true for $n=12$. Why did you think that was enough to assume it was true for all $n \geq 3$? You didn't even check between $3$ and $12$ ...

As others have pointed out, it fails for $n=5$, since $5!-1$ isn't prime:

$$5!-1 = 120 - 1 = 119 = 7 \cdot 17 $$

Even if you had checked all the way up to $12$, you should be careful with patterns like this. See this list of patterns that start off looking promising but eventually fail.

Harry
  • 67
  • 1
    Yes, I made a major fail when I went thru most of the numbers, I admit that. I thank the people that have redone the calculation. – Palu Oct 26 '17 at 04:59