code: @GwtIncompatible("need BigIntegerMath to adequately test")
    public static int binomial(int n, int k) {
      checkNonNegative("n", n);
      checkNonNegative("k", k);
      checkArgument(k <= n, "k (%s) > n (%s)", k, n);
      if (k > (n >> 1)) {
        k = n - k;
      }
      if (k >= biggestBinomials.length || n > biggestBinomials[k]) {
        return Integer.MAX_VALUE;
      }
      switch (k) {
        case 0:
          return 1;
        case 1:
          return n;
        default:
          long result = 1;
          for (int i = 0; i < k; i++) {
            result *= n - i;
            result /= i + 1;
          }
          return (int) result;
      }
    }
docs: Returns {@code n} choose {@code k}, also known as the binomial coefficient of {@code n} and
  {@code k}, or {@link Integer#MAX_VALUE} if the result does not fit in an {@code int}.
  
  @throws IllegalArgumentException if {@code n < 0}, {@code k < 0} or {@code k > n}