(50g) Catalan Transforms, Hankel Transform
|
01-24-2019, 09:45 PM
(This post was last modified: 12-06-2019 10:33 PM by John Keith.)
Post: #1
|
|||
|
|||
(50g) Catalan Transforms, Hankel Transform
NOTE: The first two programs should be considered obsolete. See following post for replacements.
Some more useful transforms for integer sequences. Many OEIS pages refer to these transforms. The first two programs can be made to run on the HP48G with some minor modifications:
The first two programs take a list of integers and return a list of the same length. First, the Catalan transform. Very informative paper here. Code:
Next, the inverse Catalan transform, also discussed in the paper linked above. Code:
Finally the Hankel transform. Some info here. This program requires a list of integers on level 2 and an integer n (the number of terms in the output list) on level 1. The list on level 2 must have at least 2*n-1 terms. Code:
|
|||
12-06-2019, 10:53 PM
Post: #2
|
|||
|
|||
RE: (50g) Catalan Transforms, Hankel Transform
First, new programs for the Catalan and inverse Catalan transforms. The new programs are significantly faster, especially for the Catalan transform.
Catalan transform: Code:
Inverse Catalan transform: Code:
Next, the ballot transform and the inverse ballot transform. These two transforms are described in the linked paper in the post above. They are related to the Catalan and binomial transforms by the following identities: The ballot transform is equivalent to the binomial transform followed by the Catalan transform. The inverse ballot transform is equivalent to the inverse Catalan transform followed by the inverse binomial transform. Ballot transform: Code:
Inverse ballot transform: Code:
The Catalan transform program requires GoferLists, and the inverse ballot transform requires ListExt. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)