Skip to main content

euler_phi

Function euler_phi 

Source
pub fn euler_phi(n: u64) -> u64
Expand description

Euler’s totient function phi(n): count of integers <= n that are coprime to n.

§Examples

use mathverse_core::integer::euler_phi;

assert_eq!(euler_phi(9), 6);
assert_eq!(euler_phi(7), 6);