The article also says, you can find a base b such that n! = b^n for any factorial. Guess what, you can do this for any number x and any n to find b such that x = b^n, whether x is a factorial or not: b is x ^ (1/n). Not sure what Stirling's approximation should have to do with this, and why = and ≈ are being used inconsistently in this post.
Ignoring my complaints of this particular post, this is a pretty great blog though, and I remember being helped by the linked older blog post article about log1p and expm1 before!
I've never actually worked with Stirling's approximation, but I guess if you have a certain set of context, this fact would be obvious?
Irrational Number: I'm a non-integer, Greg. Can you square root me?
Why?
> 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.
Getting more attention then clarifying the intent in the body is sometimes mischievous (read: every tabloid newspaper), but it nonetheless brings more good attention that it would have without the click bait. If that leads to more consulting work for the author, good for him.
(it kind of feels weird calling a high-number approximation “clickbait” but, in some circles…)
For every natural n, there exists a natural b, such that: n! ≈ b^n
I don't quite know the precise criteria for "≈" here, that's a bit beyond my understanding of the article...The fact is that `e * (n!)^(1/n)` is quite close to `n`.
But John didn't factor out the `e`, causing the confusion in this HN post's threads.
- If you only allow the base to be an integer, then it's inaccurate.
- If you allow the base to be a real number, then you're really just saying "every factorial is a positive number", which is a trivial fact if you know what a factorial is.
Either way it's a bad title IMO.
EDIT: whoever is downvoting me, the article title is objectively clickbait
The language is annoyingly misleading, and the seemingly random use of = and ≈ is frustrating.
Either my math or my english is failing me.
6.20 ≈ 10.00; 1.55 ≈ 1.00; 2.37 ≈ 2.65
That's like when my friend tortured her kid (and me) by asking how old I was, which was answered with "75". That is a very wide margin of error there.
It’s Stirling’s approximation, as the article mentions. The formula uses the ≈ character. The Wikipedia article gives bounds on the error—
Numerically, the point of the article is the fact that
n! \approx (0.826523 + n*0.373522)^n
For n in the range from 10 to 50, this is within 5% of the right answer.
But I really don't see that this is all that much simpler than Stirling's approximation and it is considerably less accurate and not asymptotically very good. Stirling's formula is within about 1% for all n>10 and within 0.1% for n>90.
Actually computing gamma(n) or lgamma(n) to high precision requires a bit more effort than this, but as an approximation, Stirling's formula is really pretty good.