RosettaCodeData/Task/Totient-function/Sidef/totient-function-1.sidef
2023-07-01 13:44:08 -04:00

5 lines
84 B
Text

func 𝜑(n) {
n.factor_exp.prod {|p|
(p[0]-1) * p[0]**(p[1]-1)
}
}