761b⟨test Euler totient761b⟩≡ (753) local multiply(k: T):I == { -- the inverse of factor:I -> T r:I := 1; for ep in k repeat {(e, p) := ep; r := r * p^e} r; } testEulerTotient(): () ==BugWorkaround( T has with {divisors: % ->Generator %; /:(%, %) -> %} ){ import fromI,SmallIntegerTools; for m in 1..100 repeat { t: T := factor m; phim:I := 0; for d in divisors t | not zero?(mu:=moebiusMu d) repeat { phim := phim + mu * multiply(t/d); } assertEquals(I, eulerPhi t, phim); } } UsesBugWorkaround48, Generator617, I47, andSmallIntegerTools555.