fareyleniSignal Generators:Models and Emulationsfareylenifareyleni
returns the length of a Farey Sequence.
Description
This opcode can be used in conjunction with GENfarey.
It calculates the length of Farey Sequence Fn. Its length is given by:
|Fn| = 1 + SUM over n phi(m)
where phi(m) is Euler's totient function, which gives the number of integers ≤ m that are coprime to m.
Some values for the length of Fn given n:
nFn1223354751161371982392910331143124713591465157316811797181031912120129Syntaxifl fareyleni ifnInitialisation
The length of the identified Farey sequence is returned.
ifn -- Integer identifying the sequence.
Examples
Here is an example of the fareyleni opcode. It uses the file fareyleni.csd.
Example of the fareyleni opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See AlsoModels and EmulationsCreditsAuthor: Georg Boenn University of Glamorgan, UKNew in Csound version 5.13