News for hackers. Stuff that matters.
Re:Decomposing a Factorial into Large Factors by yorwba on Friday March 28, 2025 @01:29PM (#43507987)
If you don't need it to be fast, the naive way to implement "the largest quantity such that it is possible to factorize N! into N factors a_1, ..., a_N, each of which is at least t(N)" is

  import math
  factorize = lambda N, number_of_factors: [(factor,) + rest for factor in range(1, N+1) if N % factor == 0 for rest in factorize(N//factor, number_of_factors-1)] if number_of_factors > 1 else [(N,)]
  t = lambda N: max(min(factors) for factors in factorize(math.factorial(N), N))

There are no comments on this comment yet.