8
$\begingroup$

While messing around with factorials, I noticed this:

$$3! - 2! + 1! = 6 - 2 + 1 = 5$$ $$4! - 3! + 2! - 1!= 24 - 6 + 2 - 1=19$$ $$5! - 4! + 3! - 2! + 1! = 5! - 19 = 101$$ $$6! - 5! + 4! - 3! + 2! - 1! = 6! - 101 = 619$$ $$7! - 6! + 5! - 4! + 3! - 2! + 1! = 7! - 619 = 4421$$

Notice that all of the sums are prime.

My question, is, does this pattern (i.e. the results are prime) continue forever? (If yes, please prove why. If no, please provide a counterexample, and why it happens.)

My attempt was to show that for every positive integer $n > 2$, $(n - 1)! - (n + 2)! + (n + 3)! - (n + 4)! $ (and so on) $ = k$, and prove that $k $ is not divisible by any prime below or equal to $(n - 1)$. (Which by the way, I almost proved it. Will edit this post if I did it.)

But, I am really confused on how to show that $k$ is not divisible by any prime bigger than $(n - 1).$ Is my approach to solve this problem correct?

$\endgroup$
6
  • $\begingroup$ The law of small numbers is quite powerful... The sequence can be taken as $a_n=n!-a_{n-1}$, so that may help further calculations. $\endgroup$
    – abiessu
    Dec 1 '21 at 1:36
  • 6
    $\begingroup$ Try $n=9$ for counterexample $\endgroup$
    – QC_QAOA
    Dec 1 '21 at 1:37
  • $\begingroup$ Oops, again I asked a really easy question that has an easy counterexample. I guess I should check at least 15 possibilities first before asking... $\endgroup$
    – MarioPrix
    Dec 1 '21 at 1:40
  • $\begingroup$ It is still an interesting observation. $\endgroup$
    – Cornman
    Dec 1 '21 at 1:43
  • 3
    $\begingroup$ See M. Zivkovic, The number of primes Sum_{i=1..n} (-1)^(n-i)*i! is finite, Math. Comp. 68 (1999), pp. 403-409, cited in OEIS A005165. An OEIS search is the first thing you should try on problems like this. $\endgroup$ Dec 1 '21 at 1:53
5
$\begingroup$

No, this pattern does not continue forever. Quite the opposite - there exist finitely many primes of this form. See https://oeis.org/A071828 and the reference there.

$\endgroup$
4
  • $\begingroup$ Is the numbers listed there the only ones out of many? $\endgroup$
    – MarioPrix
    Dec 1 '21 at 1:46
  • 2
    $\begingroup$ No, but you may find proof in the cited reference. It implies that there are at most 3612703 such primes. $\endgroup$ Dec 1 '21 at 1:49
  • $\begingroup$ Per oeis.org/A001272 only 25 such primes are known, but there may be more. $\endgroup$ Dec 1 '21 at 1:57
  • $\begingroup$ Ah, okay. Thanks for the OEIS reference! $\endgroup$
    – MarioPrix
    Dec 1 '21 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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