def _combine_threshold(d, threshold):
    """
    calculate combination number
    :param d:
    :return: a list of combination number
    """
    result = []
    sign = -1
    result.append(1)
    i = 1
    while True:
        number = (d - i + 1) / i * result[-1] * sign
        if abs(number) > threshold:
            result.append(number)
            i += 1
        else:
            break
    return result
