# Equations involving indices of binomial coefficients

I wanted to figure out which binomial coefficient would another sum of binomial coefficients be equal to. I tried to find that using the solve function in the following manner:

solve(binomial(1002,y) == sum(z*binomial((1001-z),950),z,1,51),y)


This did not yield the desired result evaluating the expression on the right side of the equation and printing the left side as it is as is shown below :

[binomial(1002, y) == 10480853106371895870377052872259391385423261386799458513700836377945732866106336546780]


How to solve this equation?

edit retag close merge delete

Welcome to Ask Sage! Thank you for your question.

( 2022-01-01 06:51:32 +0200 )edit

Sort by ยป oldest newest most voted

"Brute-force" solution :

sage: var("y, z")
(y, z)


The right-hand size involves a constant ; compute it once...

sage: R = sum(z*binomial((1001-z),950),z,1,51) ; R
10480853106371895870377052872259391385423261386799458513700836377945732866106336546780


Brute force check of all possible (integer) solution candidates :

sage: [u for u in range(1003) if binomial(1002,u)==R]
[50, 952]


If this is homework, your professor may or may not appreciate this answer : there might be subtler points in his/her course...

HTH nevertheless...

more

There's always brute force (there is only a small finite number of possibilities for $y$):

sage: var('z')
sage: rhs = sum(z*binomial((1001-z),950),z,1,51)
sage: next(y for y in range(1, 1002) if binomial(1002, y) == rhs)
50
sage: [y for y in range(1, 1002) if binomial(1002, y) == rhs]
[50, 952]

more