## You are here

Homealternating factorial

## Primary tabs

# 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 $\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.

Type of Math Object:

Definition

Major Section:

Reference

## Mathematics Subject Classification

05A10*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections