diff --git a/src/algebra/phi-function.md b/src/algebra/phi-function.md index 8129542f3..c69ee2841 100644 --- a/src/algebra/phi-function.md +++ b/src/algebra/phi-function.md @@ -73,7 +73,7 @@ int phi(int n) { ## Euler totient function from $1$ to $n$ in $O(n \log\log{n})$ { #etf_1_to_n data-toc-label="Euler totient function from 1 to n in " } -If we need all all the totient of all numbers between $1$ and $n$, then factorizing all $n$ numbers is not efficient. +If we need the totient of all numbers between $1$ and $n$, then factorizing all $n$ numbers is not efficient. We can use the same idea as the [Sieve of Eratosthenes](sieve-of-eratosthenes.md). It is still based on the property shown above, but instead of updating the temporary result for each prime factor for each number, we find all prime numbers and for each one update the temporary results of all numbers that are divisible by that prime number.