Christian Krause on Sat, 22 Oct 2022 21:47:23 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

binomial coefficient with negative args


Hi,
the binomial coefficient in GP behaves differently than I thought for negative arguments. For instance, binomial(-2,-4) yields 0 (zero). In Wolfram Alpha the result is 3. The paper by Kronenburg states this: 

image.png

For binomial(-2,-4), the second case applies: (-1)^(-2+4) * binomial(4-1,-2+4) = binomial(3,2) = 3. This is consistent with Wolfram Alpha. They also document the same definition here.

Why does PARI/GP yield different results for binomial() with negative arguments?

Best regards,
Christian