I've been using a method for expanding expressions of the form [imath](x+y)^n[/imath] without explicitly writing out the binomial coefficients. I don't remember exactly where I read it, but it is the following method. The first coefficient is always 1 since,[imath]\binom{n}{0}=1[/imath] to obtain the next coefficient in the expansion we multiply the coefficient of [imath]x[/imath] by the exponent of [imath]x[/imath] and divide by the terms position index.
As an example, consider
[math](x+1)^5=c_1x^5+c_2x^4+c_3x^3+c_4x^2+c_5x+1[/math]
Here the position index is 1 for the first term and then it continues up to 6 terms. Now [imath]c_1=1[/imath], and hence
[math]c_2=\frac{c_1\cdot5}{1}=5[/math][math]c_3=\frac{c_2\cdot4}{2}=\frac{5\cdot4}{2}=10[/math]
Here we don't have to continue since [imath]\binom{n}{k}=\binom{n}{n-k}[/imath]. As you can see this can be applied for [imath](x+y)^n[/imath] as well, and I find it faster than computing the binomial coefficients by hand. I think it's related to Pascal's triangle but I'm not sure how to prove that the algorithm works.
As an example, consider
[math](x+1)^5=c_1x^5+c_2x^4+c_3x^3+c_4x^2+c_5x+1[/math]
Here the position index is 1 for the first term and then it continues up to 6 terms. Now [imath]c_1=1[/imath], and hence
[math]c_2=\frac{c_1\cdot5}{1}=5[/math][math]c_3=\frac{c_2\cdot4}{2}=\frac{5\cdot4}{2}=10[/math]
Here we don't have to continue since [imath]\binom{n}{k}=\binom{n}{n-k}[/imath]. As you can see this can be applied for [imath](x+y)^n[/imath] as well, and I find it faster than computing the binomial coefficients by hand. I think it's related to Pascal's triangle but I'm not sure how to prove that the algorithm works.
Last edited: