Question: For reference see this post in MSE. I noticed on WolframAlpha the summation $\sum_{k=1}^{n}\frac{\cos(\pi > k)}{\csc(\pi k)}$ returns the result $\phi(n)$; which is the Euler phi function. Of course this summation should equal zero. A commentator suggested it might be bug in WolframAlpha as the Mathematica code: Sum[Cos[Pi k]/Csc[Pi k], {k, 1, n}] returns 0. At least this was the case running on Windows 10, x86, running version 12.1.1.0. Another commentator showed the same code returns EulerPhi[n] running version 12.0.0.0 on macOS. Is this a bug in Mathematica?
1 Answer
Version V12.1.1:
Sum[Cos[Pi k]/Csc[Pi k], {k, 1, n}]
(* 0 *)
Version V12.0.0:
Sum[Cos[Pi k]/Csc[Pi k], {k, 1, n}]
(* EulerPhi[n] *)
It seems there was a bug in the earlier version of V12. It's possible that Wolfram|Alpha is using V12.0 (but questions about the workings of W|A are off-topic on this site).
EulerPhi[n]
in V12.0, so there was a bug. $\endgroup$