What is Factorial?
In Mathematics, factorial is a simple thing. Factorials are just products. An exclamation mark indicates the factorial. Factorial is a multiplication operation of natural numbers with all the natural numbers that are less than it.
In short, a factorial is a function that multiplies a number by every number below it till 1. For example, the factorial of 3 represents the multiplication of numbers 3, 2, 1, i.e. 3! = 3 × 2 × 1 and is equal to 6.
Factorial Formula
The formula to find the factorial of a number is
n! = n × (n-1) × (n-2) × (n-3) × ….× 3 × 2 × 1
From the above formulas, the recurrence relation for the factorial of a number is defined as the product of the factorial number and factorial of that number minus 1. It is given by:
n! = n. (n-1) !
Double Factorial
In mathematics, a double factorial is the product of all the positive integers up to a given number that have the same parity (odd or even) as the number. It is also called a semifactorial.
The double factorial of a number n is denoted by n‼. For example, the double factorial of 9 is 9‼ = 9 × 7 × 5 × 3 × 1 = 945.
Here are some double factorial sequences:
Even numbers: 1, 2, 8, 48, 384, 3840, 46080, 645120, ...
Odd numbers: 1, 3, 15, 105, 945, 10395, 135135, ...
The double factorial of an odd number is sometimes called an odd factorial.
The double factorial is similar to the factorial, but instead of multiplying by each integer value less than or equal to the provided value, it decrements by 2.
Factorial of zero
The factorial of 0 is 1, or in symbols, 0!=1. There are several motivations for this definition:
For n=0, the definition of n! as a product involves the product of no numbers at all, and so is an example of the broader convention that the empty product, a product of no factors, is equal to the multiplicative identity.
n = n( n - 1!)
Let's say that we don't know anything about the 0!, so, we have to find it. 1=1(1-1!). We put 1 in n, to find 0! 1=1(0!). we divide the 1 by 1 which is 1. 1 = 0! Logically, this is wrong, but still, there is with expression.