August 27, 2024
P34 - Calculate Euler’s totient function ϕ ( m ) ϕ(m).
Euler’s so-called totient function ϕ(m)ϕ(m) is defined as the number of positive integers r(1<=r<=m)r(1<=r<=m) that are coprime to mm.
scala
scala> 10.totient
res0: Int = 4
August 27, 2024
Euler’s so-called totient function ϕ(m)ϕ(m) is defined as the number of positive integers r(1<=r<=m)r(1<=r<=m) that are coprime to mm.
scala
scala> 10.totient
res0: Int = 4
Don't have an account? We will create one for you.
Enter the OTP send to
in seconds. Check your spam folder if you can't find email from us.
Valid email is required for further communications