This is Perl code that efficiently performs combinatorial counting operations with the Math::Big module.
This code will use GMP or Pari if installed, with their associated perl modules.