[math-fun] Bernoulli totient generalization