Module: sage.combinat.q_analogues
q-Analogues
Module-level Functions
n, k, [p=None]) |
Returns the q-binomial coefficient.
If p is unspecified, then it defaults to using the generator q for a univariate polynomial ring over the integers.
sage: import sage.combinat.q_analogues as q_analogues sage: q_analogues.q_binomial(4,2) q^4 + q^3 + 2*q^2 + q + 1 sage: p = ZZ['p'].0 sage: q_analogues.q_binomial(4,2,p) p^4 + p^3 + 2*p^2 + p + 1
n, [p=None]) |
Returns the q-analogue of the n!.
If p is unspecified, then it defaults to using the generator q for a univariate polynomial ring over the integers.
sage: import sage.combinat.q_analogues as q_analogues sage: q_analogues.q_factorial(3) q^3 + 2*q^2 + 2*q + 1 sage: p = ZZ['p'].0 sage: q_analogues.q_factorial(3, p) p^3 + 2*p^2 + 2*p + 1
n, [p=None]) |
Returns the q-analogue of the integer n.
If p is unspecified, then it defaults to using the generator q for a univariate polynomial ring over the integers.
sage: import sage.combinat.q_analogues as q_analogues sage: q_analogues.q_int(3) q^2 + q + 1 sage: p = ZZ['p'].0 sage: q_analogues.q_int(3,p) p^2 + p + 1
n) |
Returns the q,t-Catalan number.
sage: import sage.combinat.q_analogues as q_analogues sage: q_analogues.qt_catalan_number(1) 1 sage: q_analogues.qt_catalan_number(2) q + t sage: q_analogues.qt_catalan_number(3) q^3 + q^2*t + q*t^2 + t^3 + q*t sage: q_analogues.qt_catalan_number(4) q^6 + q^5*t + q^4*t^2 + q^3*t^3 + q^2*t^4 + q*t^5 + t^6 + q^4*t + q^3*t^2 + q^2*t^3 + q*t^4 + q^3*t + q^2*t^2 + q*t^3