79576148

Date: 2025-04-15 22:56:50
Score: 2.5
Natty:
Report link

Thanks to @OscarBenjamin, I learned that the SymPy function expand_trig() (but not method, which I tried) does the job: indeed,

from sympy import S,expand_trig
tanh,artanh = S("tanh, artanh")
def f(n):
    n=S(n)
    return expand_trig(tanh(sum(artanh(k/n) for k in range(1,n))))

f(3)  # does return 9/11 !
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @OscarBenjamin
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Max