pub trait EulerPhi {
// Required method
fn euler_phi(self) -> Self;
}
Expand description
Euler の 関数。
以下の自然数のうち、 と互いに素であるものの個数を返す。 と は互いに素であることに注意。
Note
素数冪 , () について が成り立つ。また、 が成り立つ。
Complexity
time.
Examples
use nekolib::math::EulerPhi;
assert_eq!(1_u64.euler_phi(), 1);
assert_eq!(60_u64.euler_phi(), 16);