In this post, the author discusses the relationship between factorials and bases. They note that for every integer n, there is some base b such that n! = bn. Interestingly, b is almost a linear function of n. Using Stirling’s approximation, the author shows that b(n) = (2n/e)^(n+1/2)√π. This observation leads to Gauss’s multiplication formula, which states that the product of integers from 1 to n is equal to √(2πn)(n/e)^n. The post also explains the importance of loggamma functions in numerical evaluation of gamma functions.
https://www.johndcook.com/blog/2023/06/23/every-factorial-is-a-power/