A couple of days ago I made a "combinations" function in #C that works the same as #Python itertools.combinations. I used it to help with a #Numberphile challenge, however I misunderstood: duplicates WERE allowed. So I binned it all, went back to nested loops and added multi-threading. Now it only takes about 0.01 s to calculate all #tetrahedral sums (up to 5 terms) of 343867 which is supposed to be the last one that requires more than 4 terms.
Works on #Mac and #Linux: https://github.com/ednl/tetrahedral/blob/main/tetrasum.c

