Returns the -binomial coefficient.
If is unspecified, then it defaults to using the generator
for
a univariate polynomial ring over the integers.
The q-binomials are computed as a product of cyclotomic polynomials (cf. [CH2006]).
REFERENCES:
[CH2006] | William Y.C. Chen and Qing-Hu Hou, “Factors of the Gaussian coefficients”, Discrete Mathematics 306 (2006), 1446-1449. http://dx.doi.org/10.1016/j.disc.2006.03.031 |
EXAMPLES:
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: q_analogues.q_binomial(4,5)
0
sage: p = ZZ['p'].0
sage: q_analogues.q_binomial(4,2,p)
p^4 + p^3 + 2*p^2 + p + 1
sage: q_analogues.q_binomial(2,3)
0
The -analogue of binomial(n,k) is currently only defined for
a nonnegative integer, it is zero for negative k (trac #11411):
sage: q_analogues.q_binomial(5, -1)
0
Returns the -Catalan number of index
.
If is unspecified, then it defaults to using the generator
for
a univariate polynomial ring over the integers.
There are several -Catalan numbers. This procedure
returns the one which can be written using the
-binomial coefficients.
EXAMPLES:
sage: import sage.combinat.q_analogues as q_analogues
sage: q_analogues.q_catalan_number(4)
q^12 + q^10 + q^9 + 2*q^8 + q^7 + 2*q^6 + q^5 + 2*q^4 + q^3 + q^2 + 1
sage: p = ZZ['p'].0
sage: q_analogues.q_catalan_number(4,p)
p^12 + p^10 + p^9 + 2*p^8 + p^7 + 2*p^6 + p^5 + 2*p^4 + p^3 + p^2 + 1
The -Catalan number of index
is only defined for
a
nonnegative integer (trac #11411):
sage: q_analogues.q_catalan_number(-2)
Traceback (most recent call last):
...
ValueError: Argument (-2) must be a nonnegative integer.
Returns the -analogue of the factorial
.
If is unspecified, then it defaults to using the generator
for
a univariate polynomial ring over the integers.
EXAMPLES:
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
The -analogue of
is only defined for
a nonnegative
integer (trac #11411):
sage: q_analogues.q_factorial(-2)
Traceback (most recent call last):
...
ValueError: Argument (-2) must be a nonnegative integer.
Returns the -analogue of the integer
which is given by
Consequently, if then
and if
then
.
If the argument is not specified then it defaults to the generator
of the univariate polynomial ring over the integers.
EXAMPLES:
sage: import sage.combinat.q_analogues as q_analogues
sage: q_analogues.q_int(3)
q^2 + q + 1
sage: q_analogues.q_int(-3)
(-q^2 - q - 1)/q^3
sage: p = ZZ['p'].0
sage: q_analogues.q_int(3,p)
p^2 + p + 1
sage: q_analogues.q_int(3/2)
Traceback (most recent call last):
...
ValueError: 3/2 must be an integer
INPUT:
OUTPUT:
If is the power of a prime number, the output is the number of
complete flags in
(where
is the size of
) stable
under a linear nilpotent endomorphism
whose Jordan type is
given by
, i.e. such that for all
:
.. MATH::
dim (ker f^i) = t[0] + cdots + t[i-1]
If is an indeterminate, the output is a polynomial whose
values at powers of prime numbers are the previous numbers.
The result is cached.
EXAMPLES:
sage: from sage.combinat.q_analogues import q_jordan
sage: [q_jordan(mu,2) for mu in Partitions(5)]
[9765, 1029, 213, 93, 29, 9, 1]
sage: [q_jordan(mu,2) for mu in Partitions(6)]
[615195, 40635, 5643, 2331, 1491, 515, 147, 87, 47, 11, 1]
sage: q=PolynomialRing(ZZ,'q').gen()
sage: q_jordan(Partition([3,2,1]),q)
16*q^4 + 24*q^3 + 14*q^2 + 5*q + 1
If the partition is trivial (i.e. has only one part), we get
the -factorial (in this case, the nilpotent endomorphism is
necessarily
):
sage: from sage.combinat.q_analogues import q_factorial
sage: q_jordan(Partition([5]),3) == q_factorial(5,3)
True
sage: q_jordan(Partition([11]),5) == q_factorial(11,5)
True
TESTS:
sage: q_jordan(Partition([4,3,1]),1)
Traceback (most recent call last):
...
ValueError: q must not be equal to 1
AUTHOR:
Returns the q,t-Catalan number of index .
EXAMPLES:
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
The q,t-Catalan number of index is only defined for
a
nonnegative integer (trac #11411):
sage: q_analogues.qt_catalan_number(-2)
Traceback (most recent call last):
...
ValueError: Argument (-2) must be a nonnegative integer.