OFFSET
1,3
COMMENTS
The value of tanh(...) is always a rational number thanks to the relation tanh(x+y) = (tanh x + tanh y)/(1 + (tanh x)*tanh y).
So actually the set of fractions {1/n, ..., (n-1)/n} is "summed up" using the operator x (+) y := (x + y)/(1 + x*y).
By Wolstenholme's theorem; if p > 3 is prime, then p^3 divides a(p). - Thomas Ordowski, Apr 27 2025
LINKS
FORMULA
a(n) = (binomial(2n-1, n-1) - 1)/2 if n = 2^m or a(n) = binomial(2n-1, n-1) - 1 = A010763(n-1) otherwise, since tanh(Sum_{k=1..n-1} artanh(k/n)) = (binomial(2n-1, n-1) - 1)/(binomial(2n-1, n-1) + 1) reduced. - Thomas Ordowski, Apr 27 2025
EXAMPLE
For n=2, tanh(artanh(1/2)) = 1/2, so a(2) = numerator(1/2) = 1.
For n=3, tanh(artanh(1/3) + artanh(2/3)) = (1/3 + 2/3) / (1 + 1/3 * 2/3) = 9/11, so a(3) = 9.
Numerators of 0, 1/2, 9/11, 17/18, 125/127, 461/463, 1715/1717, 3217/3218, ...
PROG
(Python)
from sympy import S, expand_trig as ET
tanh, artanh = S("tanh, artanh")
def A382257_test(n): # for illustration only -- slow for n >= 19
n=S(n); return ET(tanh(sum(artanh(k/n) for k in range(1, n)))).numerator
def A382257(n):
s=0; i=S.One/n
for k in range(1, n): s = (s + i*k)/(1 + s*k*i)
return s.numerator
(Python)
from functools import reduce
from fractions import Fraction
def A382257(n): return reduce(lambda x, y: Fraction(x+y, 1+x*y), (Fraction(i, n) for i in range(1, n)), 0).numerator # Chai Wah Wu, Apr 23 2025
(PARI) A382257(n)=my(s=0); for(i=1, n-1, s=(s*n+i)/(n+s*i)); numerator(s);
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
M. F. Hasler, Apr 15 2025
STATUS
approved
