The alternating factorial is defined as the sum of consecutive factorials with alternating signs,
(1)
|
They can be given in closed form as
(2)
|
where is the exponential integral, is the En-function, and is the gamma function.
The alternating factorial will is implemented in the Wolfram Language as AlternatingFactorial[n].
A simple recurrence equation for is given by
(3)
|
where .
For , 2, ..., the first few values are 1, 1, 5, 19, 101, 619, 4421, 35899, ... (OEIS A005165).
The first few values for which are (probable) primes are , 4, 5, 6, 7, 8, 10, 15, 19, 41, 59, 61, 105, 160, 661, 2653, 3069, 3943, 4053, 4998, 8275, 9158, 11164, 43592, 59961, ... (OEIS A001272; extending Guy 1994, p. 100). ivković (1999) has shown that the number of such primes is finite. was verified to be prime in Jul. 2000 by team of G. La Barbera and others using the Certifix program developed by Marcel Martin.
The following table summarizes the largest known alternating factorial probable primes. M. Rodenkirch completed a search up in December 2017 showing there are no further (probable) primes up to that limit.
decimal digits | discoverer | |
11164 | 40344 | P. Jobbing, Nov. 25, 2004 |
43592 | 183312 | S. Balatov, Jul. 19, 2017 |
59961 | 260448 | M. Rodenkirch, Sep. 18, 2017 |