Types of Function > Factorial Function

**Contents**: (Click to skip to that section):

- What are Factorials?
- Double Factorial
- Factorial Function
- Generalized Factorial Function
- Hyperfactorial

**See also:**

Subfactorial: Simple Definition

Zero Factorial: Why Does it Equal One?

## What are Factorials?

Watch the video or read the article below:

When you see the ! symbol after a number, that means it’s a factorial:

- 6! is “six factorial.”
- 3! is “three factorial.”

To solve, just multiply “n” by every whole number below it. For example, if n is 3 then

** 3! is 3 x 2 x 1 = 6. **

It’s really just a shorthand way of writing numbers. For example, instead of writing 479001600, you could write 12! instead (which is 12 x 11 x 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1). Much easier! Here are a few more examples:

- 1! = 1
- 2! = 2
- 3! = 6
- 4! = 24
- 5! = 120

The **formal definition**: Factorials are products of every whole number (counting numbers

1, 2, 3…) from 1 to n.

## Double Factorial

A **double factorial** (n!!) is a product of all integers from 1 to *n* that have the same parity (i.e. they are either odd or even) as *n*; In other words, it’s the product of every other integer less than or equal to n. For example:

- 7!! = 7 * 5 * 3 * 1,
- 8!! = 8 * 6 * 4 * 2 * 1,
- 9!! = 9 * 7 * 5 * 3 * 1,

## Use in Calculus

Factorials are used fairly infrequently in calculus (they are more common in precalculus), but they do pop up now and again, especially when you’re working with sequences and series. For example, the ratio test is very useful when you’re working with series containing factorials.

## Factorials and Calculators

Most calculators have a button for this; It’s usually hidden in a menu somewhere. On the TI 83, you can find it in the “PRB” menu. If you’re on the internet (which you probably are if you’re reading this), Google can also do the work for you. Just use a regular exclamation mark (!).

- Go to the search bar at Google.com
- Type in a factorial, such as 12!
- Press enter
- 12 ! = 479 001 600

Google can also figure out more complicated factorials for you, like 36! / (12-10)!6!. Make sure you put in parentheses and a multiplication sign (just as you would on any basic calculator). Like this:

36! / ((12-10)! * 6!) = 2.58328699 × 10^{38}

**Google Calculator Tip:** To multiply using Google, use an asterisk (*) instead of a “×” symbol.

The **factorial function** is defined for all positive integers (1, 2, 3…) as

y = F[n] = n!

## Formal Definition of Factorial Function

The recursive definition of the factorial function (n!) is defined for natural numbers (whole, non-negative numbers that we use to count) *n *as follows:

n! = n(n – 1)(n – 2)…3 · 2 · 1

It’s called “recursive” because the same multiplication is performed over and over again, with each input multiplied by the previous result.

**Example**: Use the recursive definition of the factorial function to find 3!.

**Solution**: 3! = 3 x 2! = 3 x 2 x 1! = 3 x 2 x 1 x 0! = 3 x 2 x 1 x 1.

## A Generalized Factorial Function

The factorial function doesn’t make sense when x = 0, so a workaround was the development of the more generalized gamma function:

gamma (n + 1) = n!

The gamma function handles zero, as well as all real-valued positive values and complex numbers.

You’ll find the **factorial function** used in many areas of calculus, including Faà di Bruno’s Formula, the Beta Function and lambda calculus. They also appear in Taylor’s theorem, which finds the error for a function expressed as a power series; This appearance is in part because the nth derivative of x^{n} is n! (Beaumadier & Hausenblas, n.d.).

The function can be also be extended to all real numbers with the following definite integral (Edwards, 1974):

## Hyperfactorial

The **hyperfactorial function** multiplies a sequence of consecutive integers from 1 to a specified number, with each integer raised to its own power. It is an extension of the basic factorial function.

## Examples

It’s relatively easy to **calculate a small hyperfactorial by hand.** Just:

- Write out all the integers from 1 through the number given,
- Raise each integer to its own power,
- Multiply through.

For example, **3 hyperfactorial**, written as *H*(3), is calculated as follows:

- Write out all the integers from 1 through the number given: 1, 2, 3,
- Raise each integer to its own power: 1
^{1}, 2^{2}, 33 - Multiply through: 1
^{1}* 2^{2}* 33 = 1 * 4 * 27 = 108

.

The first 11 hyperfactorials (i.e. for integers 1 through 11) are (OEIS A002109):

- 1
- 1
- 4
- 108
- 27648,
- 86400000,
- 4031078400000,
- 3319766398771200000,
- 55696437941726556979200000,
- 21577941222941856209168026828800000,
- 215779412229418562091680268288000000000000000,
- 61564384586635053951550731889313964883968000000000000000

As you can see, the hyperfactorial grows rapidly (although not as rapidly as the superfactorial). So rapidly in fact that H(14) is almost equal to a googol.

## Extension of the Hyperfactorial

Although it’s usual to use integers, the definition can be extended. For example, Ciucu & Krattenthaler (2013) extend the definition to half-integers (i.e. odd integers divided by 2) in their paper on plane partitions.

## The K Function

The “K function” is a generalization of the hyperfactorial to complex numbers.

Note that the term “K function” is widely used in mathematics for **widely different functions.** For example, Ripley’s K-function has a very different meaning from the k-function related to hyperfactorials.

## References

Beaumadier, J. & Hausenblas, M. (n.d.). Factorial n!. Retrieved July 10, 2020 from: http://factorielle.free.fr/index_en.html

Benjamin, A. & Brown, E. (2009). Biscuits of Number Theory. Mathematical Association of America.

Ciucu, M. and Krattenthaler, C. A Dual of Macmahon’s Theorem on Plane Partitions. Proc. Natl. Acad. Sci. USA, vol. 110 (2013), 4518-4523)

Dr. Math. x Factorial and the Gamma Function. Retrieved July 10, 2020 from: http://mathforum.org/library/drmath/view/54540.html

Edwards, H. (1974). Riemann’s Zeta Function. Elsevier Science.Fletcher, A.; Miller, J. C. P.; Rosenhead, L.; and Comrie, L. J. An Index of Mathematical Tables, Vol. 1, 2nd ed. Reading, MA: Addison-Wesley, p. 50, 1962.

Graham, R. L.; Knuth, D. E.; and Patashnik, O. Concrete Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley, p. 477, 1994.

Sloane, N. & Plouffe, S. The Encyclopedia of Integer Sequences 1st Edition. Academic Press, 1995.

**CITE THIS AS:**

**Stephanie Glen**. "Factorial Function: Definition, Double, Generalized, Hyper-" From

**CalculusHowTo.com**: Calculus for the rest of us! https://www.calculushowto.com/factorial-function/

**Need help with a homework or test question? **With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. Your first 30 minutes with a Chegg tutor is free!