##
fareylen

fareylen —
returns the length of a Farey Sequence.

## Description

This opcode can be used in conjunction with *GENfarey*.
It calculates the length of Farey Sequence F_{n}. Its length is given by:
|F_{n}| = 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 F_{n} given n:

## Performance

The length of the identified Farey sequence is returned.

*kfn* -- Integer identifying the sequence.

## Credits

Author: Georg Boenn |

University of Glamorgan, UK |

New in Csound version 5.13