alternating factorial
{{For|a related alternating series of factorials|1 − 1 + 2 − 6 + 24 − 120 + ⋯}}
{{No footnotes|date=September 2021}}
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,
:
or with the recurrence relation
:
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 {{OEIS|id=A005165}}
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.
{{harvtxt|Ž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.{{sfnp|Živković|1999}} The primes are af(n) for
:n = 3, 4, 5, 6, 7, 8, 10, 15, 19, 41, 59, 61, 105, 160, 661, ... {{OEIS|id=A001272}}
with several higher probable primes that have not been proven prime.
Notes
{{reflist|30em}}
References
- {{MathWorld|urlname=AlternatingFactorial|title=Alternating Factorial}}
- {{cite journal
| last = Živković | first = Miodrag
| year = 1999
| title = The number of primes is finite
| journal = Mathematics of Computation
| publisher = American Mathematical Society
| volume = 68
| issue = 225
| pages = 403–409
| doi = 10.1090/S0025-5718-99-00990-4
| url = https://www.ams.org/journals/mcom/1999-68-225/S0025-5718-99-00990-4/home.html
| bibcode = 1999MaCom..68..403Z
}}
- Yves Gallot, [http://yves.gallot.pagesperso-orange.fr/papers/lfact.pdf Is the number of primes finite?]
- Paul Jobling, [http://listserv.nodak.edu/cgi-bin/wa.exe?A2=ind0411&L=nmbrthry&T=0&P=1106 Guy's problem B43: search for primes of form n!-(n-1)!+(n-2)!-(n-3)!+...+/-1!]