https://irfanali.org/blog/zcom #coding #humor #programming #challenges #HackerNews #ngated
Prime Factors of Factorial Numbers https://janmr.com/posts/prime-factors-of-factorial-numbers/ #math #prime #factors #factorials
\[
d_p(n!) = \sum_{k=1}^\infty \left\lfloor \frac{n}{p^k} \right\rfloor = \sum_{k=1}^{\lfloor \log_p(n) \rfloor} \left\lfloor \frac{n}{p^k} \right\rfloor
\]
Finding a billion factorials in 60 ms with SIMD
https://codeforces.com/blog/entry/143279
#HackerNews #Finding #a #billion #factorials #in #60 #ms #with #SIMD #codeforces #SIMD #performance #factorials #computing
Decomposing a Factorial into Large Factors
https://terrytao.wordpress.com/2025/03/26/decomposing-a-factorial-into-large-factors/
#HackerNews #Decomposing #a #Factorial #into #Large #Factors #mathematics #factorials #algorithms #numbertheory #TerryTao
@atamakahere Surely that would need to limit itself to u8 as the input and u128 as the output? And even then you'd need a hard limit enforced on the input value because 255! is equal to more than 3.35E104, whereas u128::MAX is less than 3.5E38.
In fact, the biggest number which fits is 34! equal to roughly 2.95E38.
Factorials grow up so fast.
#factorials #math
From @waitbutwhy
February has 28 days (7 x 4). Each day has 24 hours (8 x 3). Each hour has 60 minutes (6 x 5 x 2).
So February has 8! minutes:
8 x 7 x 6 x 5 x 4 x 3 x 2 x 1.
I sent that 1000! picture to a friend on #Hangouts (which #Google hasn't shut down... yet), and my friend commented on the large number of 0s at the end of the value.
I assured him that that's what happens with #factorials - by 5! you've got 2*5 as a subexpression, and by 10! you've got another factor of 10, well, right there. 15 brings in another factor of 5, and by that point, you've got a backlog of 2s. 25! has six trailing zeroes, with two factors of 5 right there.
That's #math for you.