def __discount_AF(i, n):
    """
    Sinking fund factor

    Factor:  (A/F, i, N)
    Formula: A = F.[i / ((1 + i)^n - 1)]

    :param i:
    :param n:
    :return:

    Cash Flow:
                   F
                   |
                   |
                   |
    -----------------
    |    |    |    |
    |    |    |    |
    A    A    A    A
    """
    f = (1 + i) ** n
    return i / (f - 1)