Mathematics

Factorials: n!

Factorials are the sequence of values produced by multiplying consecutive positive integers downward to 1. They are written using n!, read as “n factorial.”

The factorial sequence begins:

0! = 1

1! = 1

2! = 2

3! = 6

4! = 24

5! = 120

6! = 720

7! = 5,040

Each new value is obtained by multiplying the previous factorial by the next integer:

n! = n × (n – 1)!

Factorials are important because they describe how rapidly the number of possible arrangements can increase as additional objects are introduced.

The specific procedures for evaluating individual values are covered by the dedicated factorial calculation page. Here, the emphasis is on n! as a sequence, its structure, growth, relationships, and mathematical uses.

What Does n! Mean?

For a nonnegative integer n, the notation:

n!

represents a factorial.

For positive n:

n! = n × (n – 1) × (n – 2) × … × 2 × 1

For example:

4! = 4 × 3 × 2 × 1

4! = 24

The notation compresses a potentially long multiplication into just two symbols: the integer and the factorial sign.

The Factorial Sequence

The first several factorials are:

nn!
01
11
22
36
424
5120
6720
75,040
840,320
9362,880
103,628,800
1139,916,800
12479,001,600

The values begin modestly, then increase extremely quickly.

This growth pattern makes factorials central to problems where the number of possibilities expands with every additional object.

Why 0! and 1! Both Equal 1

The factorial sequence begins with:

0! = 1

1! = 1

For 1!, the reason is immediate:

1! = 1

For 0!, the definition keeps the recursive relationship:

n! = n × (n – 1)!

consistent at:

n = 1

because:

1! = 1 × 0!

and therefore:

1 = 1 × 0!

which requires:

0! = 1

There is also one empty arrangement of zero objects, which is important in counting mathematics.

Recursive Structure of Factorials

Successive factorials satisfy:

(n + 1)! = (n + 1) × n!

For example:

6! = 6 × 5!

Since:

5! = 120

we get:

6! = 720

Then:

7! = 7 × 6!

= 7 × 720

= 5,040

The sequence therefore builds directly from earlier values.

Ratios of Consecutive Factorials

An important relationship is:

n! / (n – 1)! = n

For example:

8! / 7! = 8

because:

8! = 8 × 7!

Similarly:

12! / 11! = 12

The ratio between consecutive factorials increases linearly even though the factorial values themselves grow extremely rapidly.

Factorials and Multiplication Patterns

A factorial is a descending product:

6! = 6 × 5 × 4 × 3 × 2 × 1

This differs from repeated powers.

For example:

6⁵ = 6 × 6 × 6 × 6 × 6

The rules of exponents describe repeated multiplication of a base, whereas factorials multiply a changing sequence of integers.

That distinction matters whenever both ! and powers appear in the same expression.

Why Factorials Grow So Quickly

Compare the transition from one factorial to the next:

5! = 120

6! = 6 × 120 = 720

7! = 7 × 720 = 5,040

8! = 8 × 5,040 = 40,320

Every step multiplies by a larger number.

The ratio:

(n + 1)! / n! = n + 1

itself increases without bound.

As a result, factorial growth eventually exceeds ordinary fixed-base exponential growth such as 2^n or 10^n.

Factorials and Arrangements

The most intuitive interpretation of n! is the number of ways to arrange n distinct objects in order.

Suppose there are four objects:

A, B, C, D

The first position has:

4 choices

After one object is used, the second position has:

3 choices

Then:

2 choices

and finally:

1 choice

Therefore:

Number of arrangements = 4 × 3 × 2 × 1

= 4!

= 24

This connection is fundamental to combinatorics.

Why n! Counts Full Arrangements

For n distinct objects:

The first position has:

n choices

The next has:

n – 1 choices

Then:

n – 2

and the process continues until one object remains.

Using the multiplication principle:

Arrangements = n × (n – 1) × … × 2 × 1

Therefore:

Arrangements = n!

So the factorial sequence can be interpreted as a sequence of arrangement counts.

Factorials and Permutations

When only some objects are arranged, factorials still provide compact notation.

The permutations formula is:

nPr = n! / (n – r)!

The denominator cancels the part of the full factorial corresponding to objects that were not selected.

For example:

8P3 = 8! / 5!

Cancel:

8P3 = 8 × 7 × 6

= 336

The factorial sequence therefore provides the natural structure behind ordered selections.

Factorials and Combinations

When order no longer matters, the combinations formula divides by additional factorial terms:

nCr = n! / (r! × (n – r)!)

For example:

6C2 = 6! / (2! × 4!)

Cancel 4!:

6C2 = (6 × 5) / 2

= 15

The extra r! corrects for the different orderings of the same selected objects.

Factorials in Probability

Suppose six distinct cards are shuffled uniformly.

The total number of possible complete orders is:

6! = 720

If a probability question depends on one specific ordering:

Probability = 1 / 720

If several arrangements satisfy an event, their count may form the numerator.

Factorials therefore often enter probability through counting rather than through probability rules themselves.

Factorials and Factors

Every n! contains each positive integer from 1 through n as part of its defining product.

For example:

10! = 10 × 9 × 8 × … × 2 × 1

Therefore every integer from 1 through 10 divides 10!.

This connects factorial structure with factors.

For example:

7 divides 10!

8 divides 10!

9 divides 10!

10 divides 10!

All occur directly in the product.

Factorials and Common Factors

If:

m < n

then:

m!

is a factor of:

n!

because:

n! = n × (n – 1) × … × (m + 1) × m!

For example:

8! = 8 × 7 × 6!

Therefore:

6!

divides:

8!

exactly.

This creates many immediate common factors between factorial values.

GCD of Two Factorials

For nonnegative integers m and n, suppose:

m ≤ n

Then:

m!

divides:

n!

Therefore:

GCD(m!, n!) = m!

So more compactly:

GCD(m!, n!) = min(m, n)!

For example:

GCD(6!, 9!) = 6!

Since:

6! = 720

we have:

GCD(6!, 9!) = 720

This follows directly from the nested structure of factorial products.

Factorials and the Euclidean Algorithm

For arbitrary integers, the Euclidean algorithm efficiently finds a greatest common divisor using repeated remainders.

Pure factorial pairs often have an easier relationship because the smaller factorial divides the larger one.

For example:

GCD(7!, 10!)

does not require a long remainder sequence.

Since:

10! = 10 × 9 × 8 × 7!

we immediately obtain:

GCD(7!, 10!) = 7!

The Euclidean algorithm becomes more useful when a factorial is compared with an unrelated integer.

Factorials and Prime Factorization

Every factorial can be decomposed into prime powers.

For example:

5! = 120

and:

120 = 2³ × 3 × 5

For:

8! = 40,320

the prime structure contains still higher powers of 2 and 3.

Prime factorization can reveal how many times a given prime divides a factorial without writing every ordinary divisor.

This becomes important in divisibility and trailing-zero questions.

Number of Times a Prime Divides n!

Suppose you want to count how many factors of a prime p occur inside n!.

The count can be obtained from:

floor(n / p) + floor(n / p²) + floor(n / p³) + …

until the terms become zero.

For example, count factors of 5 in:

100!

Calculate:

floor(100 / 5) = 20

floor(100 / 25) = 4

floor(100 / 125) = 0

Therefore:

Number of factors of 5 = 20 + 4

= 24

This is why:

100!

has 24 trailing zeros: there are far more factors of 2 than factors of 5.

Every n! for n ≥ 3 Is Composite

Consider:

3! = 6

For any:

n ≥ 3

the factorial includes at least:

2 × 3

along with additional factors as n increases.

Therefore factorial values beginning with 3! belong to the composite numbers.

The exceptions are:

0! = 1

1! = 1

2! = 2

The value 2 is prime, while 1 is neither prime nor composite.

Factorials and Divisibility

Because factorials contain long runs of consecutive integer factors, they have strong divisibility properties.

For example:

12!

is divisible by:

2, 3, 4, 5, …, 12

It is also divisible by many products constructed from those factors.

The ordinary divisibility rules can test individual integer values, while factorial structure can sometimes establish divisibility immediately without inspecting decimal digits.

Factorials and the Fibonacci Sequence

Factorials and the Fibonacci sequence are both integer sequences, but they are generated very differently.

Factorials satisfy:

n! = n × (n – 1)!

The Fibonacci sequence satisfies:

Fₙ = Fₙ₋₁ + Fₙ₋₂

So factorials use multiplication by the current index, while Fibonacci numbers use addition of the previous two sequence values.

Their growth behavior is therefore very different.

Comparing Early Factorial and Fibonacci Values

A simple comparison makes the distinction clear.

Factorials:

1, 1, 2, 6, 24, 120, 720, …

Fibonacci numbers:

0, 1, 1, 2, 3, 5, 8, 13, …

Factorials eventually increase vastly faster because each step multiplies by an increasing integer.

The similarity is only that both define sequences recursively.

Factorials and Exponential Growth

Factorials grow faster than fixed-base exponential sequences such as:

2^n

for sufficiently large n.

Consider:

For n = 5:

5! = 120

2⁵ = 32

For n = 10:

10! = 3,628,800

2¹⁰ = 1,024

The gap widens rapidly.

That distinction is important when evaluating how quickly a combinatorial search space becomes enormous.

Number of Digits in Large Factorials

Factorials quickly become too long to write conveniently.

The number of decimal digits in a positive integer N can be determined using logarithms:

Digits = floor(log₁₀(N)) + 1

For a factorial:

Digits in n! = floor(log₁₀(n!)) + 1

and:

log₁₀(n!) = log₁₀(1) + log₁₀(2) + … + log₁₀(n)

This allows the size of a factorial to be analyzed without necessarily writing the entire integer.

Example: 10!

We know:

10! = 3,628,800

This has:

7 digits

The logarithmic rule gives a value between 6 and 7 before flooring and adding one, producing the same result.

For much larger factorials, this method becomes more useful.

Factorials in Algorithms

A computational problem involving all arrangements of n distinct objects may require considering:

n!

cases.

This growth quickly becomes impractical.

For example:

8! = 40,320

10! = 3,628,800

12! = 479,001,600

An algorithm that checks every permutation can therefore become expensive after only a modest increase in input size.

This type of factorial complexity is often written conceptually as:

O(n!)

Why Factorial Growth Matters in Search Problems

Suppose a program must examine every possible ordering of 15 objects.

The number of possibilities is:

15! = 1,307,674,368,000

That is more than one trillion orderings.

Even if each ordering were processed quickly, exhaustive enumeration could be impractical.

Factorials therefore help explain why some combinatorial problems require smarter strategies than brute-force search.

Factorials and Recursive Computation

The recurrence:

n! = n × (n – 1)!

naturally suggests recursion.

Conceptually:

factorial(n) = n × factorial(n – 1)

with the base case:

factorial(0) = 1

For:

factorial(4)

the process becomes:

4 × factorial(3)

4 × 3 × factorial(2)

4 × 3 × 2 × factorial(1)

4 × 3 × 2 × 1 × factorial(0)

Since:

factorial(0) = 1

the result is:

24

The same result can also be calculated iteratively without recursion.

Factorials and Empty Arrangements

The value:

0! = 1

has an important combinatorial interpretation.

If there are no objects to arrange, there is one possible arrangement:

the empty arrangement

There are not zero ways to do nothing. There is one configuration containing no selected objects.

This interpretation keeps formulas such as:

nC0 = 1

consistent because:

nC0 = n! / (0! × n!)

= 1

Factorials and Choosing Everything

Similarly:

nCn = 1

because there is exactly one way to choose all n available objects.

Using factorials:

nCn = n! / (n! × 0!)

Since:

0! = 1

the expression becomes:

1

This demonstrates how the special value 0! supports the boundary cases of combinatorial formulas.

Factorials and Arrangements With Repeated Objects

If all objects are distinct, the number of complete arrangements is:

n!

If some objects are identical, n! counts visually identical arrangements multiple times.

Suppose there are n total objects, with repeated groups of sizes:

a, b, c, …

The number of distinct arrangements becomes:

n! / (a! × b! × c! × …)

For example, the letters in LEVEL contain:

5 total letters
2 Ls
2 Es

So:

Distinct arrangements = 5! / (2! × 2!)

= 120 / 4

= 30

Factorials therefore provide both the initial arrangement count and the correction for repeated objects.

Factorials in Binomial Coefficients

The expression:

n! / (r!(n-r)!)

produces a binomial coefficient.

These coefficients appear in counting and probability because they measure how many unordered subsets of size r can be selected from n objects.

For example:

10! / (3! × 7!) = 120

So there are:

120

ways to choose 3 objects from 10.

Factorial notation makes the symmetry and cancellation in such formulas compact.

Symmetry in Factorial Ratios

Because:

nCr = n! / (r!(n-r)!)

interchanging:

r

and:

n – r

does not change the denominator.

Therefore:

nCr = nC(n-r)

For example:

10C3 = 10C7

Both equal:

120

The factorial structure makes this symmetry immediately visible.

Factorials and Integer Results

Although many factorial formulas contain division, expressions such as permutation and combination counts produce integers when used with valid nonnegative integer parameters.

For example:

10! / (3! × 7!)

looks like an ordinary fraction, but it simplifies exactly to:

120

This reflects the combinatorial meaning: a number of possible selections must be an integer.

Factorials and Division

Factorial ratios often simplify using ordinary division.

For example:

7! / 5!

becomes:

7 × 6

= 42

Rather than calculating:

7! = 5,040

and:

5! = 120

then dividing:

5,040 / 120 = 42

cancelling the shared factorial structure first is usually more efficient.

Factorials Are Not Factor Lists

Because the terms sound alike, it is worth keeping their purposes separate.

For:

6

the factorial is:

6! = 720

The positive factors of 6 are:

1, 2, 3, 6

The factorial is one number created by multiplication. The factor list identifies numbers that divide the original integer.

Factorials Are Not Powers

Similarly:

4! = 24

while:

4⁴ = 256

and:

4² = 16

The exclamation mark and exponent notation encode entirely different operations.

Factorials Are Not Repeated Addition

A sequence such as Fibonacci grows by addition:

Fₙ = Fₙ₋₁ + Fₙ₋₂

Factorials grow by multiplication:

n! = n × (n – 1)!

That multiplicative recurrence is what produces their unusually rapid growth.

Domain of Ordinary Factorials

In elementary mathematics, factorials are defined for:

0, 1, 2, 3, …

That is, the nonnegative integers.

Ordinary factorial notation does not assign finite factorial values to negative integers such as:

(-1)!

(-2)!

(-5)!

Advanced mathematics extends the factorial concept to many non-integer values through another function, but ordinary n! problems generally use nonnegative integer inputs.

Common Mistakes With Factorials

One mistake is treating:

n!

as:

n × n

For example:

4! ≠ 4 × 4

Instead:

4! = 4 × 3 × 2 × 1 = 24

Another error is assuming:

0! = 0

The correct value is:

0! = 1

It is also incorrect to subtract factorial symbols as though they represented ordinary punctuation.

For example:

5! – 4!

means:

120 – 24

= 96

not a manipulation of the exclamation marks themselves.

How to Check Factorial Sequence Values

Consecutive values should satisfy:

n! = n × (n – 1)!

Suppose a table claims:

8! = 40,320

and:

9! = 362,880

Check:

9 × 40,320 = 362,880

The relationship is satisfied.

If a listed sequence value does not equal the previous factorial multiplied by its index, an arithmetic error has occurred.

Frequently Asked Questions

What are factorials?

Factorials are numbers generated by multiplying a nonnegative integer through all smaller positive integers down to 1.

For positive n:

n! = n × (n – 1) × … × 1

What does n! mean?

It means “n factorial.”

For example:

6! = 720

What are the first factorials?

The sequence begins:

1, 1, 2, 6, 24, 120, 720, 5,040, …

corresponding to:

0!, 1!, 2!, 3!, 4!, 5!, 6!, 7!, …

Why is 0! equal to 1?

The value preserves the recursive factorial formula and corresponds to the single empty arrangement of zero objects.

How are factorials related to permutations?

The number of complete arrangements of n distinct objects is:

n!

Partial ordered arrangements use:

nPr = n! / (n-r)!

How are factorials related to combinations?

Combinations use:

nCr = n! / (r!(n-r)!)

to remove duplicate orderings of the same selected group.

Do factorials grow faster than exponential sequences?

Factorials eventually grow faster than any fixed-base exponential sequence such as 2^n.

Are factorials always even?

For:

n ≥ 2

n! is even because it contains 2 as a factor.

The values:

0! = 1

and:

1! = 1

are odd.

Are factorials prime?

Only:

2! = 2

is prime among ordinary factorial values. For n ≥ 3, n! is composite.

What is the GCD of two factorials?

If:

m ≤ n

then:

GCD(m!, n!) = m!

because m! divides n!.

Why do factorials appear in counting?

Arranging n distinct objects creates n choices for the first position, n - 1 for the second, and so on, giving:

n × (n – 1) × … × 1 = n!

Can factorials be used for negative integers?

Ordinary factorial notation does not define finite factorial values for negative integers.

Final Example

Suppose 8 different finalists can finish in any order.

The number of complete finishing orders is:

8!

Using the factorial sequence:

8! = 40,320

Now suppose only first, second, and third place matter.

The number of ordered podium results is:

8! / 5!

Cancel the shared factorial:

8 × 7 × 6

= 336

So:

Complete arrangements of 8 finalists = 40,320

while:

Ordered top-three results = 336

That contrast captures why factorials are so useful: n! represents the full explosion of possible arrangements, while ratios of factorials let that structure be adapted to more specialized counting problems.

Mehran Khan

Mehran Khan is the primary author at The Logic Library and CEO & Founder of One Digit Media. With 10+ years of experience in software engineering, SEO, and digital publishing, he uses a research-led approach to Logics, Maths, Tech, Formulas, Science, and AI.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button