Euler's Totient Calculator – Up To 20 Digits!

JavaScripter.net | Math with JavaScript | Prime Factors | Divisors | 100+ Digit Calculator

Input a number n: Euler's totient function φ(n): Run time:

Euler's totient function φ(n) is the number of positive integers not exceeding n that have no common divisors with n (other than the common divisor 1).

In other words, φ(n) is the number of integers m coprime to n such that 1 ≤ mn.
(Note that the number 1 is counted as coprime to all positive integers including itself.)

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:
100+ digit calculator: arbitrary precision arithmetic
Prime factorization calculator
Highly composite numbers
Divisors and sum-of-divisors calculator
Binomial Coefficients Calculator
Fibonacci numbers calculator
Catalan numbers calculator

Doing Math with JavaScript. Copyright © 1999-2015, JavaScripter.net.