Post Reply 
(50g) Euler Transform
03-12-2019, 10:17 PM (This post was last modified: 08-07-2019 11:27 AM by John Keith.)
Post: #1
(50g) Euler Transform
Following are programs for computing the Euler transform and its inverse for sequences of integers. Both require the ListExt Library. The inverse transform also requires Gerald Hillier's MOB program which computes the Moebius Mu function.

Euler transform:

Code:

\<< DUP SIZE R\->I \-> n
  \<< DUP HEAD SWAP 2 n
    FOR k k DIVIS DUP2 LPICK * LSUM SWAP
    NEXT DROP n \->LIST DUP 1. 1. SUB 2 n
    FOR j OVER 1 j 1 - SUB OVER REV * LSUM PICK3 j GET + j / +
    NEXT NIP
  \>>
\>>

Inverse Euler transform:

Code:

\<< DUP SIZE R\->I \-> n
  \<< DUP 1. 1. SUB 2 n
    FOR j OVER 1 j 1 - SUB OVER REV * LSUM PICK3 j GET j * SWAP - +
    NEXT NIP 1 n
    FOR k k DIVIS DUP2 LPICK SWAP REV MOB * LSUM k / SWAP
    NEXT DROP n \->LIST
  \>>
\>>
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(50g) Euler Transform - John Keith - 03-12-2019 10:17 PM
RE: (50g) Euler Transform - Thomas Klemm - 03-14-2019, 07:49 PM
RE: (50g) Euler Transform - John Keith - 03-16-2019, 09:12 PM
RE: (50g) Euler Transform - John Keith - 08-07-2019, 11:32 AM



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