Calculate Fast Fourier Transform (FFT) with window functions, complex number support, and advanced visualization options.
Euler's totient function φ(n) (also called Euler's phi function) counts the positive integers up to a given integer n that are relatively prime to n (i.e., numbers whose greatest common divisor with n is 1).
If n is a positive integer and a is an integer coprime to n (i.e., gcd(a, n) = 1), then:
aφ(n) ≡ 1 (mod n)
This theorem is a generalization of Fermat's Little Theorem and is fundamental in number theory and cryptography (particularly RSA encryption).
| Property | Formula | Example |
|---|---|---|
| Prime p | φ(p) = p - 1 | φ(7) = 6 |
| Prime power pk | φ(pk) = pk - pk-1 | φ(8) = φ(2³) = 8 - 4 = 4 |
| Multiplicative (gcd(m,n)=1) | φ(m·n) = φ(m)·φ(n) | φ(6) = φ(2)·φ(3) = 1·2 = 2 |
| General formula | φ(n) = n·∏(1 - 1/p) | φ(12) = 12·(1-1/2)·(1-1/3) = 4 |
| Sum over divisors | ∑ φ(d) = n for all d|n | φ(1)+φ(2)+φ(3)+φ(6) = 1+1+2+2 = 6 |
| Even for n > 2 | φ(n) is even for n > 2 | φ(15) = 8 (even) |
| Prime factorization | If n = ∏ piai, then φ(n) = ∏ piai-1(pi - 1) | φ(100) = φ(2²·5²) = 2·1·5·4 = 40 |
Prime Factorization Method: Factor n into prime powers: n = p₁a₁·p₂a₂·...·pₖaₖ. Then φ(n) = n·(1 - 1/p₁)·(1 - 1/p₂)·...·(1 - 1/pₖ).
Multiplicative Property: If n = ab where gcd(a,b) = 1, then φ(n) = φ(a)·φ(b). This allows breaking down the calculation for composite numbers.
Direct Enumeration: For small n, count the numbers from 1 to n that are coprime to n by checking gcd(k, n) = 1 for each k.
Calculator Features: