ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 01 Jan 2022 12:00:17 +0100Equations involving indices of binomial coefficientshttps://ask.sagemath.org/question/60480/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?Fri, 31 Dec 2021 02:25:04 +0100https://ask.sagemath.org/question/60480/equations-involving-indices-of-binomial-coefficients/Comment by slelievre for <p>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:</p>
<pre><code>solve(binomial(1002,y) == sum(z*binomial((1001-z),950),z,1,51),y)
</code></pre>
<p>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 : </p>
<pre><code>[binomial(1002, y) == 10480853106371895870377052872259391385423261386799458513700836377945732866106336546780]
</code></pre>
<p>How to solve this equation?</p>
https://ask.sagemath.org/question/60480/equations-involving-indices-of-binomial-coefficients/?comment=60496#post-id-60496Welcome to Ask Sage! Thank you for your question.Sat, 01 Jan 2022 06:51:32 +0100https://ask.sagemath.org/question/60480/equations-involving-indices-of-binomial-coefficients/?comment=60496#post-id-60496Answer by Emmanuel Charpentier for <p>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:</p>
<pre><code>solve(binomial(1002,y) == sum(z*binomial((1001-z),950),z,1,51),y)
</code></pre>
<p>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 : </p>
<pre><code>[binomial(1002, y) == 10480853106371895870377052872259391385423261386799458513700836377945732866106336546780]
</code></pre>
<p>How to solve this equation?</p>
https://ask.sagemath.org/question/60480/equations-involving-indices-of-binomial-coefficients/?answer=60502#post-id-60502"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...
Sat, 01 Jan 2022 12:00:17 +0100https://ask.sagemath.org/question/60480/equations-involving-indices-of-binomial-coefficients/?answer=60502#post-id-60502Answer by rburing for <p>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:</p>
<pre><code>solve(binomial(1002,y) == sum(z*binomial((1001-z),950),z,1,51),y)
</code></pre>
<p>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 : </p>
<pre><code>[binomial(1002, y) == 10480853106371895870377052872259391385423261386799458513700836377945732866106336546780]
</code></pre>
<p>How to solve this equation?</p>
https://ask.sagemath.org/question/60480/equations-involving-indices-of-binomial-coefficients/?answer=60501#post-id-60501There'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]Sat, 01 Jan 2022 11:51:36 +0100https://ask.sagemath.org/question/60480/equations-involving-indices-of-binomial-coefficients/?answer=60501#post-id-60501