Question: WolframAlpha gives the following expression $$\sum_{k=1}^{n}\frac{\cos(\pi k)}{\csc(\pi k)}=\phi(n);$$ where $\phi()$ is the Euler totient function. You can check for yourself here. Is this incorrect ?

Surely $\frac{\cos(\pi k)}{\csc(\pi x)}=0$ for every natural number $k,$ and so the sum should always equal zero. Am I misinterpreting the output from WolframAlpha or did I type it in wrong ? I know that $\frac{\cos(\pi k)}{\csc(\pi x)}=\frac{1}{2}\sin(2\pi k),$ whose partial sum WolframAlpha correctly shows: check.

  • 2
    $\begingroup$ Looks like a bug as Mathematica returns Sum[Cos[Pi k]/Csc[Pi k], {k, 1, n}] = 0 $\endgroup$
    – Moo
    Sep 9, 2020 at 17:55
  • $\begingroup$ I have a version of Mathematica that returns EulerPhi[n], version on macOS $\endgroup$ Sep 9, 2020 at 17:57
  • 2
    $\begingroup$ Interesting! I am Windows 10, x86, running version Maybe we could post this on the Mathermatica Stack Exchange. $\endgroup$
    – Moo
    Sep 9, 2020 at 17:59
  • $\begingroup$ Should I cross-post ? Is that allowed ? $\endgroup$
    – Anthony
    Sep 9, 2020 at 17:59
  • $\begingroup$ The MMA group would want MMA only and MMA code in the post - not WA. $\endgroup$
    – Moo
    Sep 9, 2020 at 18:00


You must log in to answer this question.

Browse other questions tagged .