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.Thu, 02 Mar 2017 18:38:16 +0100Symbolic sum with q_binomialhttps://ask.sagemath.org/question/36788/symbolic-sum-with-q_binomial/ Hi,
I'm new to sagemath. I'm trying to define a function that depends on a sum of a q-binomial, but I get "unable to convert n to an integer".
So, this works:
sum(binomial(n,k),k,1,n)
(output gives $2^n-1$)
but this doesn't:
sum(q_binomial(n,k),k,1,n)
All I did was add the "q_", which is the proper way to define a q-binomial in sage, as I already tested (try q_binomial(5,3) and the output is correct).
Anyone can help?ricardoklThu, 02 Mar 2017 18:38:16 +0100https://ask.sagemath.org/question/36788/Inconsistency in q_analogues?https://ask.sagemath.org/question/34140/inconsistency-in-q_analogues/In:
from sage.combinat.q_analogues import q_int
from sage.combinat.q_analogues import q_factorial
from sage.combinat.q_analogues import q_binomial
from sage.combinat.q_analogues import q_catalan_number
print q_int(5).parent()
print q_factorial(5).parent()
print q_binomial(3,2).parent()
print q_catalan_number(5).parent()
Out:
Univariate Polynomial Ring in q over Integer Ring
Univariate Polynomial Ring in q over Integer Ring
Univariate Polynomial Ring in q over Integer Ring
Fraction Field of Univariate Polynomial Ring in q over Integer Ring
What is the reason that the q_catalan_numbers have a different type than, say, the q_factorials?Peter LuschnyTue, 19 Jul 2016 21:47:44 +0200https://ask.sagemath.org/question/34140/