(49g/50g) Gaussian Binomial Triangles and Transforms
|
02-17-2021, 09:26 PM
(This post was last modified: 02-17-2021 09:34 PM by John Keith.)
Post: #1
|
|||
|
|||
(49g/50g) Gaussian Binomial Triangles and Transforms
This group of programs compute the Gaussian binomial coefficients and the q-Stirling numbers which are closely related.
The first four programs return triangles as lists of lists. For each program, the integer on level 2 is the number of rows to return(*). The number on level 1 is the parameter q as described in the Wikipedia link. q is normally an integer but these programs will also accept real, complex or rational (e.g. '1/2') numbers. (*) By convention, binomial coefficients start with row 0 while Stirling numbers usually start with row 1. Therefor the Stirling programs will return n rows while the binomial programs return n+1 rows (0 through n). The next four programs implement integer transforms based on the above triangles. These are the q-analogs of the binomial, inverse binomial, Stirling S2 and Stirling S1 transforms respectively. Level 2 should have a list of numbers, and level 1 should have the parameter q as above. For the programs listed above, if q = 1, the "standard" triangles will be returned (Pascal's triangle, it's inverse, the Stirling numbers of the 2nd kind and the Stirling numbers of the 1st kind respectively.) The last program takes the integers n and k, and the parameter q and returns the individual Gaussian binomial coefficient [n, k]q. As above q can be any numeric type and also symbolic (e.g. 'x'), but cannot be either 1 or -1. Some of the programs require the ListExt Library. The programs are being posted as a directory for convenience but no program is dependent on any others and unwanted programs can be removed to save space. Code:
|
|||
02-20-2021, 06:42 PM
Post: #2
|
|||
|
|||
RE: (49g/50g) Gaussian Binomial Triangles and Transforms
Updating to add another program to compute the q-Catalan numbers. Specifically, these are referred to as the "Carlitz-Riordan q-Catalan numbers". There are other types but they seem to be of little interest. For further information, search OEIS for "q-Catalan".
With an integer n on level 2 and q on level 1, the program will return a list of q-Catalan numbers from 0 to n. q may be any numeric data type or a name (e.g. 'x'). Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)