The Egorychev method is a collection of techniques for finding identities among sums of binomial coefficients. The method relies on two observations. First, many identities can be proved by extracting coefficients of generating functions. Second, many generating functions are convergent power series, and coefficient extraction can be done using the Cauchy residue theorem (usually this is done by integrating over a small circular contour enclosing the origin). The sought-for identity can now be found using manipulations of integrals. Some of these manipulations are not clear from the generating function perspective. For instance, the integrand is usually a rational function, and the sum of the residues of a rational function is zero, yielding a new expression for the original sum. The residue at infinity is particularly important in these considerations.
The main integrals employed by the Egorychev method are:
First binomial coefficient integralSecond binomial coefficient integralExponentiation integralFirst Iverson bracketSecond Iverson bracketSuppose we seek to evaluate
                              S                      j                          (        n        )        =                  ∑                      k            =            0                                n                          (        −        1                  )                      k                                                              (                                      n              k                                      )                                                                          (                                                      n                +                k                            k                                      )                                                                          (                                      k              j                                      )                                              which is claimed to be :                    (        −        1                  )                      n                                                              (                                      n              j                                      )                                                                          (                                                      n                +                j                            j                                      )                                      .                
Introduce
                                                        (                                                      n                +                k                            k                                      )                                      =                              1                          2              π              i                                                ∫                                    |                        z                          |                        =            ε                                                              (              1              +              z                              )                                  n                  +                  k                                                                    z                              k                +                1                                                            d        z                and
                                                        (                                      k              j                                      )                                      =                              1                          2              π              i                                                ∫                                    |                        w                          |                        =            ε                                                              (              1              +              w                              )                                  k                                                                    w                              j                +                1                                                            d        w        .                This yields for the sum
                                                                                                                            1                                          2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                                              (                      1                      +                      z                                              )                                                  n                                                                                      z                                                                                        1                                          2                      π                      i                                                                                        ∫                                                            |                                        w                                          |                                        =                    ε                                                                                        1                                          w                                              j                        +                        1                                                                                                              ∑                                      k                    =                    0                                                        n                                                  (                −                1                                  )                                      k                                                                                                              (                                                              n                      k                                                              )                                                                                                                                  (                      1                      +                      z                                              )                                                  k                                                                    (                      1                      +                      w                                              )                                                  k                                                                                                            z                                              k                                                                                                            d                w                                d                z                                                                    =                                                                                                                  1                                          2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                                              (                      1                      +                      z                                              )                                                  n                                                                                      z                                                                                        1                                          2                      π                      i                                                                                        ∫                                                            |                                        w                                          |                                        =                    ε                                                                                        1                                          w                                              j                        +                        1                                                                                                                                  (                    1                    −                                                                                            (                          1                          +                          w                          )                          (                          1                          +                          z                          )                                                z                                                              )                                                        n                                                                  d                w                                d                z                                                                    =                                                                                                                  1                                          2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                                              (                      1                      +                      z                                              )                                                  n                                                                                                            z                                              n                        +                        1                                                                                                                                  1                                          2                      π                      i                                                                                        ∫                                                            |                                        w                                          |                                        =                    ε                                                                                        1                                          w                                              j                        +                        1                                                                                            (                −                1                −                w                −                w                z                                  )                                      n                                                                  d                w                                d                z                                                                    =                                                                                                                                        (                      −                      1                                              )                                                  n                                                                                                            2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                                              (                      1                      +                      z                                              )                                                  n                                                                                                            z                                              n                        +                        1                                                                                                                                  1                                          2                      π                      i                                                                                        ∫                                                            |                                        w                                          |                                        =                    ε                                                                                        1                                          w                                              j                        +                        1                                                                                            (                1                +                w                +                w                z                                  )                                      n                                                                  d                w                                d                z                .                                                            This is
                                                        (              −              1                              )                                  n                                                                    2              π              i                                                ∫                                    |                        z                          |                        =            ε                                                              (              1              +              z                              )                                  n                                                                    z                              n                +                1                                                                          1                          2              π              i                                                ∫                                    |                        w                          |                        =            ε                                                1                          w                              j                +                1                                                              ∑                      q            =            0                                n                                                              (                                      n              q                                      )                                                w                      q                          (        1        +        z                  )                      q                                  d        w                d        z        .                Extracting the residue at                     w        =        0                 we get
                                                                                                                                                  (                      −                      1                                              )                                                  n                                                                                                            2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                                              (                      1                      +                      z                                              )                                                  n                                                                                                            z                                              n                        +                        1                                                                                                                                                        (                                                              n                      j                                                              )                                                                      (                1                +                z                                  )                                      j                                                                  d                z                                                                    =                                                                                                                                        (                                                              n                      j                                                              )                                                                                                                                  (                      −                      1                                              )                                                  n                                                                                                            2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                                              (                      1                      +                      z                                              )                                                  n                          +                          j                                                                                                            z                                              n                        +                        1                                                                                                            d                z                                                                    =                                                                                            (                −                1                                  )                                      n                                                                                                              (                                                              n                      j                                                              )                                                                                                                                  (                                                                                      n                        +                        j                                            n                                                              )                                                                                                                  thus proving the claim.
Suppose we seek to evaluate                               ∑                      k            =            0                                n                          k                                            (                                                      2                n                                            n                +                k                                                    )                                      .                
Introduce
                                                        (                                                      2                n                                            n                +                k                                                    )                                      =                              1                          2              π              i                                                ∫                                    |                        z                          |                        =            ε                                                1                          z                              n                −                k                +                1                                                                          1                          (              1              −              z                              )                                  n                  +                  k                  +                  1                                                                            d        z        .                Observe that this is zero when                     k        >        n                 so we may extend                     k                 to infinity to obtain for the sum
                                                                                                                            1                                          2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                        1                                          z                                              n                        +                        1                                                                                                                                  1                                          (                      1                      −                      z                                              )                                                  n                          +                          1                                                                                                                                      ∑                                      k                    ≥                    0                                                  k                                                                            z                                              k                                                                                    (                      1                      −                      z                                              )                                                  k                                                                                                                                    d                z                                                                    =                                                                                                                  1                                          2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                        1                                          z                                              n                        +                        1                                                                                                                                  1                                          (                      1                      −                      z                                              )                                                  n                          +                          1                                                                                                                                                                                z                                              /                                            (                      1                      −                      z                      )                                                              (                      1                      −                      z                                              /                                            (                      1                      −                      z                      )                                              )                                                  2                                                                                                                                    d                z                                                                    =                                                                                                                  1                                          2                      π                      i                                                                                        ∫                                                            |                                        z                                          |                                        =                    ε                                                                                        1                                          z                                              n                                                                                                                                  1                                          (                      1                      −                      z                                              )                                                  n                                                                                                                                                          1                                          (                      1                      −                      2                      z                                              )                                                  2                                                                                                                                    d                z                .                                                            Now put                     z        (        1        −        z        )        =        w                 so that (observe that the image of                               |                z                  |                =        ε                 with                     ε                 small is another closed circle-like contour which we may certainly deform to obtain another circle                               |                w                  |                =        γ                )
                    z        =                                            1              −                                                1                  −                  4                  w                                                      2                                            and                        (        1        −        2        z                  )                      2                          =        1        −        4        w                and furthermore
                    d        z        =        −                              1            2                          ×                              1            2                          ×        (        −        4        )        ×        (        1        −        4        w                  )                      −            1                          /                        2                                  d        w        =        (        1        −        4        w                  )                      −            1                          /                        2                                  d        w                to get for the integral
                                          1                          2              π              i                                                ∫                                    |                        w                          |                        =            γ                                                1                          w                              n                                                                          1                          1              −              4              w                                      (        1        −        4        w                  )                      −            1                          /                        2                                  d        w        =                              1                          2              π              i                                                ∫                                    |                        w                          |                        =            γ                                                1                          w                              n                                                                          1                          (              1              −              4              w                              )                                  3                                      /                                    2                                                                            d        w        .                This evaluates by inspection to (use the Newton binomial)
                                                                                                        4                                      n                    −                    1                                                                                                              (                                                                                      n                        −                        1                        +                        1                                                  /                                                2                                                                    n                        −                        1                                                                                    )                                                                      =                                  4                                      n                    −                    1                                                                                                              (                                                                                      n                        −                        1                                                  /                                                2                                                                    n                        −                        1                                                                                    )                                                                      =                                                                            4                                              n                        −                        1                                                                                    (                      n                      −                      1                      )                      !                                                                                        ∏                                      q                    =                    0                                                        n                    −                    2                                                  (                n                −                1                                  /                                2                −                q                )                                                                    =                                                                                                                                        2                                              n                        −                        1                                                                                    (                      n                      −                      1                      )                      !                                                                                        ∏                                      q                    =                    0                                                        n                    −                    2                                                  (                2                n                −                2                q                −                1                )                =                                                                            2                                              n                        −                        1                                                                                    (                      n                      −                      1                      )                      !                                                                                                                                  (                      2                      n                      −                      1                      )                      !                                                                                      2                                                  n                          −                          1                                                                    (                      n                      −                      1                      )                      !                                                                                                                          =                                                                                                                                        n                                              2                                                                                    2                      n                                                                                                                                  (                                                                                      2                        n                                            n                                                              )                                                                      =                                                      1                    2                                                  n                                                                            (                                                                                      2                        n                                            n                                                              )                                                                      .                                                            Here the mapping from                     z        =        0                 to                     w        =        0                 determines the choice of square root. This example also yields to simpler methods but was included here to demonstrate the effect of substituting into the variable of integration.