Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Binomial in a Summation

sage: clear sage: var('k') k sage: sum(binomial(5,k),k,0,5)

I get an error "cannot convert k to int"

But if instead I try something like sum(binomial(n,k),k,0,n), everything is just fine.

Anyone know how I can get around this?

Binomial in a Summation

sage: clear clear

sage: var('k') k var('k')

k

sage: sum(binomial(5,k),k,0,5)

I get an error "cannot convert k to int"

But if instead I try something like sum(binomial(n,k),k,0,n), everything is just fine.

Anyone know how I can get around this?

Binomial in a Summation

sage: clear

sage: var('k')

k

sage: sum(binomial(5,k),k,0,5)

I get an error "cannot convert k to int"

But if instead I try something like sum(binomial(n,k),k,0,n), everything is just fine.

Anyone know how I can get around this?