This is regarding the topic "Factorial" written by Bunuel for GMAT Club's Math Book.
When finding the power of non-prime number in \(n!\) we first do prime-factorization of the non-prime number and then find the powers of each prime number in \(n!\) one by one using the following formula
\(\frac{n}{p}+\frac{{n}}{{p^2}}+\frac{{n}}{{p^3}}+....+\frac{{n}}{{p^x}}\) such that \(p^x <n\), where \(p\) is the prime number.
Let's suppose, we want to find the powers of \(80\) in \(40!\).
Prime factorization of \(80=2^4 * 5^1\).
Now first find the power of \(2\) in \(40!\);
\(\frac{{40}}{{2}}+\frac{{40}}{{2^2}}+\frac{{40}}{{2^3}}+\frac{{40}}{{2^4}}+\frac{{40}}{{2^5}}=20+10+5+2+1=38\)powers of \(2\) in \(40!\) --> \(2^{38}\)
Now find the powers of \(5\) in \(40!\);
\(\frac{{40}}{{5}}+\frac{{40}}{{5^2}}=8+1=9 --> 5^9\)
And \(40!=80^x*q=(2^4 * 5^1)^x*q\), where \(q\) is the quotient and \(x\) is any power of \(80\), now from above calculation
\(40!=(2^{38}*5^9)*q=(2^4*5^1)^9*2^2*q=(80)^9*4q\), So we have \(80\) in the power of \(9\) in \(40!\).
Now, the main reason for why did I do all of the above is that whether I am doing it right or not? I took values (\(80\) & \(40!\)) randomly and tried to apply the rule/method and I was confused whether I am (or should it be
am I?

) right or not. Would like expert opinions. -->Bunuel? or Shrouded1? or Gurpreetsingh?