import math


def make_coeffs(d, m):
    """Precomputes the coefficients of the backshift operator.

    Examples
    --------

    >>> make_coeffs(1, 1)
    {0: -1}

    >>> make_coeffs(2, 1)
    {0: -2, 1: 1}

    >>> make_coeffs(3, 1)
    {0: -3, 1: 3, 2: -1}

    >>> make_coeffs(2, 7)
    {6: -2, 13: 1}

    """

    def n_choose_k(n, k):
        f = math.factorial
        return f(n) // f(k) // f(n - k)

    return dict(
        (k * m - 1, int(math.copysign(1, (k + 1) % 2 - 1)) * n_choose_k(n=d, k=k))
        for k in range(1, d + 1)
    )