If nn is an integer such that n≥0n≥0 then nn factorial is defined as,
n!=n(n−1)(n−2)⋯(3)(2)(1)if n≥10!=1by definitionn!=n(n−1)(n−2)⋯(3)(2)(1)if n≥10!=1by definition
Let’s compute a couple real quick.1!=12!=2(1)=23!=3(2)(1)=64!=4(3)(2)(1)=245!=5(4)(3)(2)(1)=1201!=12!=2(1)=23!=3(2)(1)=64!=4(3)(2)(1)=245!=5(4)(3)(2)(1)=120
In the last computation above, notice that we could rewrite the factorial in a couple of different ways. For instance,
5!=5(4)(3)(2)(1)4!=5⋅4!5!=5(4)(3)(2)(1)3!=5(4)⋅3!5!=5(4)(3)(2)(1)⏟4!=5⋅4!5!=5(4)(3)(2)(1)⏟3!=5(4)⋅3!
In general, we can always “strip out” terms from a factorial as follows.
n!=n(n−1)(n−2)⋯(n−k)(n−(k+1))⋯(3)(2)(1)=n(n−1)(n−2)⋯(n−k)⋅(n−(k+1))!=n(n−1)(n−2)⋯(n−k)⋅(n−k−1)!
n general, we can always “strip out” terms from a factorial as follows.
n!=n(n−1)(n−2)⋯(n−k)(n−(k+1))⋯(3)(2)(1)=n(n−1)(n−2)⋯(n−k)⋅(n−(k+1))!=n(n−1)(n−2)⋯(n−k)⋅(n−k−1)!n!=n(n−1)(n−2)⋯(n−k)(n−(k+1))⋯(3)(2)(1)=n(n−1)(n−2)⋯(n−k)⋅(n−(k+1))!=n(n−1)(n−2)⋯(n−k)⋅(n−k−1)!
We will need to do this on occasion so don’t forget about it.