# alternating factorial

The *alternating factorial ^{}* $af(n)$ of a positive integer $n$ is the sum

$$af(n)=\sum _{i=1}^{n}{(-1)}^{n-i}i!,$$ |

which can also be expressed with the recurrence relation $af(n)=n!-af(n-1)$ with starting condition $af(1)=1$. The notation nÃÂ¡! (alternating an inverted exclamation mark with a regular exclamation mark) has been proposed by analogy to that of the double factorial^{}, but has not gained much support, in part because of TeX’s lack of support for Spanish characters^{}.

The first few alternating factorials, listed in A005165 of Sloane’s OEIS, are 1, 5, 19, 101, 619, 4421.

In 1999, Miodrag Zivković proved that $\mathrm{gcd}(n,af(n))=1$ and that the set of alternating factorials that are prime numbers^{} is finite. $af(661)$ is the largest such known prime.

Title | alternating factorial |
---|---|

Canonical name | AlternatingFactorial |

Date of creation | 2013-03-22 16:19:59 |

Last modified on | 2013-03-22 16:19:59 |

Owner | PrimeFan (13766) |

Last modified by | PrimeFan (13766) |

Numerical id | 7 |

Author | PrimeFan (13766) |

Entry type | Definition |

Classification | msc 05A10 |