Gauss Numbers

GaussNumber(n, v): RngIntElt, RngElt -> RngElt

Given an integer \(n\) and a ring element \(v\), this function returns the Gauss number corresponding to \(n\) with parameter \(v\), i.e., the element \([n]_v = v^{n-1}+v^{n-3}+\cdots + v^{-n+3}+v^{-n+1}\).

GaussianFactorial(n, v): RngIntElt, RngElt -> RngElt

Given an integer \(n\) and a ring element \(v\), this function returns the Gaussian factorial corresponding to \(n\) with parameter \(v\), i.e., the element \([n]_v! = [n]_v[n-1]_v\cdots [1]_v\).

GaussianBinomial(n, k, v): RngIntElt, RngIntElt, RngElt -> RngElt

Given an integer \(n\), an integer \(k\), and a ring element \(v\), this function returns the Gaussian binomial \(n\) choose \(k\) with parameter \(v\), i.e., the element \([n]_v!/([k]_v![n-k]_v!)\).

Example: Gaussian Binomial Coefficients (ex-331222)
> F<q>:= RationalFunctionField(Rationals());
> GaussianBinomial(5, 3, q^2);
(q^24 + q^20 + 2*q^16 + 2*q^12 + 2*q^8 + q^4 + 1)/q^12

Run in calculator (opens in a new tab)