97 points by ibobev 6 days ago | 43 comments | View on ycombinator
svobodamartin 5 days ago |
ninju 5 days ago |
https://czep.net/weblog/52cards.html
Anyone know how to determine the age of this page (it's got be at least 20yrs old)
andrewla 5 days ago |
Instead of introducing the gamma function, they instead start from the observation that log(F_n) - log(F_n-1) = log(n), so treating this difference as analogous to integration, it says that F_n ~= nlogn + n as the leading asymptotic behavior. This is clear just by substitution and algebra; no calculus necessary (though it helps to "know the answer beforehand").
From there you can treat the error term in this as F_n = n^n * e^n * E_n and plug that into the same relationship (F_n = n * F_n-1) to derive what that error term looks like asymptotically, and end up in the same place that the integration on the OP leads to.
movpasd 5 days ago |
Sharlin 5 days ago |
1 * 2 * … * n ≤ n * … * n.
(This approximation should be familiar to many from an algorithmics class.)For a tighter bound, use n lg n - n/2, or a better approximation of ln 10 in place of 1/2 if you wish. This comes from Stirling's approximation which notes that
ln n! = n ln n - n + O(ln n).abetusk 5 days ago |
As an aside, if you take numbers from 0 to (n-1) in an array, there are n! configurations, so representing each configuration or differentiating each configuration take n lg n bits. So, in some sense, taking a mapping that's able to differentiate the input state to map to the ordered state takes at least O(n lg n) time, the standard runtime of a basic sorting algorithm.
Any additional assumptions (n larger than maximum element, distribution of elements) helps reduce this.
mohamedmohey 4 days ago |
Searching now, I just learned of tetrofactorial, which is a factorial using tetration operations. There's also pentation which is repeated tetration.
And there's a whole wiki for it here: googology.fandom.com
It's fun because the numbers are so big it's basically infinity but any of those numbers is still nothing compared to infinity.
cwmoore 4 days ago |
The widest two rows are nine digits across, but while the first can be any of arrangements of the digits 1-9, the second cannot repeat any digits in the same columns, and so it limits allowable permutations to the number of derangements — which is close to 9!/e (where e is Euler’s Constant 2.718…)
No idea what this has to do with the relationship of i and pi.
pagade 5 days ago |
hermitcrab 5 days ago |
brudgers 6 days ago |
emil-lp 5 days ago |
n! < exp(n log n)
anthk 5 days ago |
https://t3x.org/klisp/22/index.html
Dog slow but the old n270 netbook (32 bit) handles big factorials >20 fine, and OFC it's instant under Common Lisp (SBCL) and Scheme (both S9 and Chicken).
smcin 5 days ago |
Start a timer that will count down the number of seconds from 52! to 0. Then walk around the Earth’s equator with one step every billion years. Then, after you make your way around the earth equator (by taking 1 step every billion of years), you take one drop of water out of the Pacific Ocean. Then, you repeat the process of walking around the equator, and everytime you walk around, you keep draining one singular drop of water. After the ocean is fully drained, you refill the ocean and put a piece of paper underneath you. Now, you once again repeat this process of walking, draining, and placing papers. After your stack of papers has reached the Sun, you repeat another 1000 times.
After all this, you have completed just about a third of the timer.
https://sites.imsa.edu/hadron/2025/02/26/how-big-is-52/