Euler's totient function φ(n)
is the number of positive integers not exceeding n that have
In other words, φ(n) is the number of integers m coprime to n such that 1 ≤ m ≤ n.
SOME TEST CASES FOR EULER'S TOTIENT FUNCTION: φ(1) = 1 φ(100) = 40 φ(2) = 1 φ(9007199254740881) = 9007199254740880 φ(20) = 8 φ(9007199254740997) = 9007199254740996 φ(36) = 12 φ(999999999999999999) = 441994921381739520 φ(81) = 54 φ(9999999999999999999) = 6666666666666666660 φ(90) = 24 φ(99999999999999999999) = 58301444908800000000
See also:
|
Doing Math with JavaScript. Copyright © 1999-2015, JavaScripter.net.