login
a(n) is the numerator of tanh(Sum_{k=1..n-1} artanh(k/n)), where artanh is the inverse hyperbolic tangent function.
4

%I #42 Jan 20 2026 16:31:44

%S 0,1,9,17,125,461,1715,3217,24309,92377,352715,1352077,5200299,

%T 20058299,77558759,150270097,1166803109,4537567649,17672631899,

%U 68923264409,269128937219,1052049481859,4116715363799,16123801841549,63205303218875,247959266474051,973469712824055,3824345300380219,15033633249770519

%N a(n) is the numerator of tanh(Sum_{k=1..n-1} artanh(k/n)), where artanh is the inverse hyperbolic tangent function.

%C 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).

%C So actually the set of fractions {1/n, ..., (n-1)/n} is "summed up" using the operator x (+) y := (x + y)/(1 + x*y).

%C By Wolstenholme's theorem; if p > 3 is prime, then p^3 divides a(p). - _Thomas Ordowski_, Apr 27 2025

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Area_function_(inverse_hyperbolic_function)">Area function (inverse hyperbolic function)</a>

%F 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

%e For n=2, tanh(artanh(1/2)) = 1/2, so a(2) = numerator(1/2) = 1.

%e 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.

%e Numerators of 0, 1/2, 9/11, 17/18, 125/127, 461/463, 1715/1717, 3217/3218, ...

%o (Python)

%o from sympy import S,expand_trig as ET

%o tanh,artanh = S("tanh, artanh")

%o def A382257_test(n): # for illustration only -- slow for n >= 19

%o n=S(n); return ET(tanh(sum(artanh(k/n) for k in range(1,n)))).numerator

%o def A382257(n):

%o s=0; i=S.One/n

%o for k in range(1,n): s = (s + i*k)/(1 + s*k*i)

%o return s.numerator

%o (Python)

%o from functools import reduce

%o from fractions import Fraction

%o 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

%o (PARI) A382257(n)=my(s=0); for(i=1, n-1, s=(s*n+i)/(n+s*i));numerator(s);

%Y Cf. A001700, A010763, A034602, A383431 (denominators).

%K nonn,frac

%O 1,3

%A _M. F. Hasler_, Apr 15 2025