1
$\begingroup$

I would like to know how to implement the sum $$f(m,n)=\frac{1}{n}\left(\sum_{t|gcd(m,n)}{\frac{m}{t}+\frac{n}{t}-1 \choose \frac{m}{t}}\phi(t)\right)$$ for two given positive entires $m, n$. Here, $\phi$ is Euler's totient function and the thing between parentheses is the binomial notation. My difficulty is to define the sum of all the parcels ${\frac{m}{t}+\frac{n}{t}-1 \choose \frac{m}{t}}\phi(t)$ such that $t$ divides $gcd(m,n)$. I guess there is a simple solution for that.

$\endgroup$
4
  • 2
    $\begingroup$ Mulitply the summand by Boole[Mod[GCD[m,n],t]==0]? $\endgroup$
    – kglr
    Mar 3, 2020 at 23:42
  • $\begingroup$ @kglr yeah that's a good solution... thank you =) $\endgroup$
    – Filburt
    Mar 3, 2020 at 23:48
  • $\begingroup$ out of curiosity, are these the circular binomial coefficients? $\endgroup$ Mar 4, 2020 at 0:07
  • $\begingroup$ @AccidentalFourierTransform nope :-) $\endgroup$
    – Filburt
    Mar 4, 2020 at 0:21

1 Answer 1

2
$\begingroup$
Sum[..., {t,Divisors[GCD[m,n]]}]
$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.