DefinitionThe factorial of a
non-negative integer \(n\), denoted by \(n!\), is the product of all
positive integers less than or equal to \(n\).
For example: \(4!=1*2*3*4=24\).
Properties- Factorial of a negative number is undefined.
- \(0!=1\), zero factorial is defined to equal 1.
- \(n!=(n-1)!*n\), valid for \(n\geq{1}\).
Trailing zeros:Trailing zeros are a sequence of 0's in the decimal representation of a number, after which no other digits follow. For example: 125,000 has 3 trailing zeros;
The number of trailing zeros in the decimal representation of
n!, the factorial of a non-negative integer \(n\), can be determined with this formula:
\(\frac{n}{5}+\frac{n}{5^2}+\frac{n}{5^3}+...+\frac{n}{5^k}\), where \(k\) must be chosen such that \(5^k\leq{n}\)
Example:How many zeros are in the end (after which no other digits follow) of 32!?
\(\frac{32}{5}+\frac{32}{5^2}=6+1=7\). Notice that the denominators must be less than or equal to 32 also notice that we take into account only the quotient of division (that is \(\frac{32}{5}=6\) not 6.4). Therefore, 32! has 7 trailing zeros.
The formula actually counts the number of factors 5 in \(n!\), but since there are
at least as many factors 2, this is equivalent to the number of factors 10, each of which gives one more trailing zero.
Finding the powers of a prime number p, in the n!The formula is:
\(\frac{n}{p}+\frac{n}{p^2}+\frac{n}{p^3}+...+\frac{n}{p^k}\), where \(k\) must be chosen such that \(p^k\leq{n}\)
Example:What is the power of 2 in 25!?
\(\frac{25}{2}+\frac{25}{4}+\frac{25}{8}+\frac{25}{16}=12+6+3+1=22\).
Inputs from GMAT math book