Misplaced Pages

Alternating factorial

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
For a related alternating series of factorials, see 1 − 1 + 2 − 6 + 24 − 120 + ...
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations. (September 2021) (Learn how and when to remove this message)

In mathematics, an alternating factorial is the absolute value of the alternating sum of the first n factorials of positive integers.

This is the same as their sum, with the odd-indexed factorials multiplied by −1 if n is even, and the even-indexed factorials multiplied by −1 if n is odd, resulting in an alternation of signs of the summands (or alternation of addition and subtraction operators, if preferred). To put it algebraically,

af ( n ) = i = 1 n ( 1 ) n i i ! {\displaystyle \operatorname {af} (n)=\sum _{i=1}^{n}(-1)^{n-i}i!}

or with the recurrence relation

af ( n ) = n ! af ( n 1 ) {\displaystyle \operatorname {af} (n)=n!-\operatorname {af} (n-1)}

in which af(1) = 1.

The first few alternating factorials are

1, 1, 5, 19, 101, 619, 4421, 35899, 326981, 3301819, 36614981, 442386619, 5784634181, 81393657019 (sequence A005165 in the OEIS)

For example, the third alternating factorial is 1! – 2! + 3!. The fourth alternating factorial is −1! + 2! − 3! + 4! = 19. Regardless of the parity of n, the last (nth) summand, n!, is given a positive sign, the (n – 1)th summand is given a negative sign, and the signs of the lower-indexed summands are alternated accordingly.

This pattern of alternation ensures the resulting sums are all positive integers. Changing the rule so that either the odd- or even-indexed summands are given negative signs (regardless of the parity of n) changes the signs of the resulting sums but not their absolute values.

Živković (1999) proved that there are only a finite number of alternating factorials that are also prime numbers, since 3612703 divides af(3612702) and therefore divides af(n) for all n ≥ 3612702. The primes are af(n) for

n = 3, 4, 5, 6, 7, 8, 10, 15, 19, 41, 59, 61, 105, 160, 661, ... (sequence A001272 in the OEIS)

with several higher probable primes that have not been proven prime.

Notes

  1. Živković (1999).

References

Categories: