diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 5c8cc982a89a2c..338a5f9615aae3 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -1150,7 +1150,7 @@ The following recipes have a more mathematical flavor: # https://mathworld.wolfram.com/TotientFunction.html # totient(12) --> 4 because len([1, 5, 7, 11]) == 4 for p in unique_justseen(factor(n)): - n = n // p * (p - 1) + n -= n // p return n