Post Reply 
(48) (49) (50) Moebius transforms
01-19-2021, 09:33 PM (This post was last modified: 01-20-2021 10:07 PM by John Keith.)
Post: #2
RE: Moebius transforms
Related to the programs above, here is a program for the Dirichlet inverse of a sequence. The Dirichlet inverse is defined in the Wikipedia link in the post above.

This program is defined in terms of a sequence rather than a function so that it can be applied to sequences that are not defined in terms of a simple function. The first term of the sequence must be 1, otherwise the result will be incorrect. This program also requires the ListExt Library.

Code:

\<< DUP SIZE R\->I \-> b n
  \<< { 1 } 2 n
    FOR k k DIVIS b OVER TAIL LPICK UNROT OVER SWAP REV TAIL LPICK ROT * LSUM NEG +
    NEXT
  \>>
\>>

For the reason stated above, I have added an alternate version of the Dirichlet convolution program for sequences rather than functions.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Moebius transforms - John Keith - 01-19-2021 09:33 PM



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