https://www.johndcook.com/blog/2023/06/23/every-factorial-is-a-power/ John D. Cook Skip to content * MATH + PROBABILITY + SIGNAL PROCESSING + NUMERICAL COMPUTING + SEE ALL ... * STATS + EXPERT TESTIMONY + FORECASTING + RNG TESTING + SEE ALL ... * PRIVACY + HIPAA + CRYPTOGRAPHY + DIFFERENTIAL PRIVACY * WRITING + BLOG + TWITTER + ARTICLES + TECH NOTES + SUBSCRIBE + NEWSLETTER * ABOUT + CLIENTS + ENDORSEMENTS + TEAM + SERVICES (832) 422-8646 Contact Every factorial is a power Posted on 23 June 2023 by John The previous post mentioned that 24! [?] 10^24 and 25! [?] 10^25. For every n, there is some base b such that n! = b^n. For example, 30! [?] 12^30. It's easy to find b [1]: b = \exp\left( \frac{\log n!}{n} \right) What's interesting is that b is very nearly a linear function of n. [factorial_base2] In hindsight it's clear that this should be the case--it follows easily from Stirling's approximation--but I didn't anticipate this before I plotted it. Now fix n and find b such that n! = b^n. Since the relationship between n and b(n) is nearly linear, this suggests (2n)! \approx (2b)^{2n} = 2^{2n} (n!)^2 which is true. It follows from the multiplication identity for the gamma function: [gamma_multiplication_simple] Let z = n + 1/2 so that the left side is (2n)!. On the right side, G( z + 1/2) = n! and G(z) is not too different from n!. The rest of the right side is 2^2n/[?]p. So our observation that b(n) is nearly linear gave us a hint of Gauss's multiplication formula. [1] Numerically you would probably evaluate this function by calling a routine that computes log G(n + 1) directly without computing G(n + 1) first. This avoids overflow for large n. This is why mathematical libraries will have not only gamma functions but also loggamma functions. The latter seems redundant, but it's not . Categories : Math Tags : Special functions Bookmark the permalink Post navigation Previous PostMentally approximating factorials Next PostNumbers don't typically have many prime factors 2 thoughts on "Every factorial is a power" 1. Michael Albert 23 June 2023 at 17:37 The approximation you note could also be seen by observing that $C(2n, n) = \frac{(2n)!}{(n!)^2}$ on the one hand, and (as the central binomial) is also at least $2^{2n}/n$ (in fact more like $2^{2n}/\sqrt{n}$ of course by central limit stuff.) 2. Martin Cohen 26 June 2023 at 13:17 The basic approximation I use is n! ~ (n/e)^n so ln(n!) ~ n(ln(n)-1). The basic inequality is (n/e)^n < n! < (n/e)^{n+1}. When considering convergence of series using the n-th root test, (n!)^{1/n} ~ n/e so ((an)!)^{1/n} = (((an)!)^{1/(an)})^a ~(an/e)^a = a^an^a/e^a. Leave a Reply Your email address will not be published. Required fields are marked * [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment * [ ] Name * [ ] Email * [ ] Website [ ] [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] Search for: [ ] [Search] John D. Cook John D. Cook, PhD My colleagues and I have decades of consulting experience helping companies solve complex problems involving data privacy, math, statistics, and computing. Let's talk. We look forward to exploring the opportunity to help your company too. [ ] [ ] [ ] [ ] [ ] [Send] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] John D. Cook (c) All rights reserved. Search for: [ ] [Search] (832) 422-8646 EMAIL