code: public static final long combinations(final int n, final int r) {
      return BigIntegerMath.factorial(n)
          .divide(BigIntegerMath.factorial(r).multiply(BigIntegerMath.factorial(n - r)))
          .longValue();
    }
docs: Calculates the possible combinations of chosen types (r) from a list of types (n) or n over r.
  <p>
  Mathematical it is following formula: <br>
  \(\binom{n}{r} = \frac{n!}{r!(n-r)!}\)