Post Reply 
(49g/50g) Gaussian Binomial Triangles and Transforms
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:

\<< SWAP I\->R \-> q n
  \<< 1 2. n
    START DUP q * EVAL
    NEXT n \->LIST { 1 1 } 2. n
    FOR k OVER 1. k SUB OVER DUP REVLIST * * \GSLIST EVAL +
    NEXT NIP
  \>>
\>>
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (49g/50g) Gaussian Binomial Triangles and Transforms - John Keith - 02-20-2021 06:42 PM



User(s) browsing this thread: 1 Guest(s)