c(n,k) equals subdivisions To compare n files, the total comparison count is:
$$
  {{n}\choose{k}} = C^k_n = \dfrac{n!}{k! ( n - k )!}
$$
with k = 2. Input space is composed by all pairs of files to compare. I want to split input space by the number of processor available to parallelize comparison. Dividing the input space doesn't divide the comparison's count equally.
If file's count is 100, the comparison's count is 4 950, with 4 processors: processors 1, 2 and 3 should do 1 237 comparisons and processor 4 should do 1 239 comparisons.
Dividing 100 per 4 gives this comparison's count for each processor:


*

*p1: files  1.. 25, first compared to the next 99 files, second to 98 -> 2 175 comparisons

*p2: files 26.. 50 -> 1 550 comparisons

*p3: files 50.. 75 ->   925 comparisons

*p4: files 76..100 ->   300 comparisons


The correct ranges, empirically determined, are [0..13[ (1295 comparisons), [13..29[ (1240 comparisons), [29..50[ (1239 comparisons) and [50..100[ (1 176 comparisons)
I need the reverse function of $ C^k_n $ to determine n from the comparisons count.

There's an amusing solution in the case of $4$ processors.
Consider the space of all $(i,j)$ file indexes you're going to compare. This is a triangle, the half of a square with side $n$.
You can split this triangle into four identical ones by means of the other diagonal and the medians.

This generalizes to all powers of $2$.
