%I M0124 N0050 #73 Sep 08 2022 08:44:30
%S 1,-1,-1,-2,-1,-2,-1382,-4,-3617,-87734,-349222,-310732,-472728182,
%T -2631724,-13571120588,-13785346041608,-7709321041217,-303257395102,
%U -52630543106106954746,-616840823966644,-522165436992898244102,-6080390575672283210764,-10121188937927645176372
%N Numerators in Taylor series for cot x.
%C Can be written as numerators of multiples of Bernoulli numbers.
%C From _Wolfdieter Lang_, Jun 12 2017: (Start)
%C cot(x) = Sum_{k>=0} r(k-1)*x^(2*k-1), with the rationals r(n) = a(n)/A036278(n), for n >= -1, for 0 < |x| < Pi.
%C coth(x) = Sum_{k>=0} (-1)^k*r(k-1)*x^(2*k-1), for 0 < |x| < Pi.
%C Exercise 2., ch. VI, in Whittaker-Watson, p. 122: 4*Integral_{y=0..infinity} sin(x*y)/(exp(2*Pi*y)-1) dy = coth(x/2) - 2/x. Attributed to Legendre. (End)
%C Let c(1) = 1/3, c(n) = (Sum_{k=1..n-1} c(k)*c(n-k))/(2*n+1) = -(-1)^n * 2^(2*n) * bernoulli(2*n) / (2*n)!. Then f(x) := 1 - x * cot(x) = Sum_{n>=1} c(n) * x^(2*n) and d/dx (x*f(x)) = x^2 + f(x)^2. Now a(n) = - numerator of c(n+1) for n>=0. - _Michael Somos_, Apr 25 2020
%D M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 75 (4.3.70).
%D G. W. Caunt, Infinitesimal Calculus, Oxford Univ. Press, 1914, p. 477.
%D L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 88.
%D A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 74.
%D H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1, p. 19.
%D H. A. Rothe, in C. F. Hindenburg, editor, Sammlung Combinatorisch-Analytischer Abhandlungen, Vol. 2, Chap. XI. Fleischer, Leipzig, 1800, p. 331.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1958, p. 122, Exercise 2.
%H Seiichi Manyama, <a href="/A002431/b002431.txt">Table of n, a(n) for n = -1..313</a> (terms -1..100 from T. D. Noe)
%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 75 (4.3.70).
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Cotangent.html">Cotangent</a>
%H <a href="/index/Be#Bernoulli">Index entries for sequences related to Bernoulli numbers.</a>
%F a(n) = - numerator(A000182(n)/(4^n-1)) for n>0.
%F cot(x) = Sum_{k>=0} (-1)^k*B_{2*k}*4^k*x^(2*k-1)/(2*k)!.
%F a(n) = numerator(r(n)), with the negative rational numbers r(n) = [x^n]( (cot(sqrt(x))-1/sqrt(x))/sqrt(x)), n >= 0. - _Wolfdieter Lang_, Oct 07 2016
%e G.f. = 1/x - (1/3)*x - (1/45)*x^3 - (2/945)*x^5 - (1/4725)*x^7 - (2/93555)*x^9 + O(x^11).
%p b := n -> (-1)^n*2^(2*n)*bernoulli(2*n)/(2*n)!;
%p a := n -> numer(b(n+1)); seq(a(i),i=-1..25);
%p # _Peter Luschny_, Jun 08 2009
%t a[n_] := (-1)^(n+1)*4^(n+1)*BernoulliB[2*n+2]/(2*n+2)! // Numerator; Table[a[n], {n, -1, 25}] (* _Jean-François Alcover_, Apr 14 2014, after _Peter Luschny_ *)
%o (PARI) apply(r->numerator(r),Vec(1/tan(x))) \\ _Charles R Greathouse IV_, Apr 14 2014
%o (PARI) a(n) = numerator((-1)^(n+1)*4^(n+1)*bernfrac(2*n+2)/(2*n+2)!); \\ _Altug Alkan_, Dec 02 2015
%o (Python)
%o from sympy import bernoulli, factorial
%o def a(n):
%o return ((-4)**(n+1)*bernoulli(2*n+2)/factorial(2*n+2)).numerator()
%o [a(n) for n in range(-1, 25)] # _Indranil Ghosh_, Jun 23 2017
%o (Magma) [Numerator( (-1)^(n+1)*4^(n+1)*Bernoulli(2*n+2)/Factorial(2*n+2) ): n in [-1..25]]; // _G. C. Greubel_, Jul 03 2019
%o (Sage) [numerator( (-1)^(n+1)*4^(n+1)*bernoulli(2*n+2)/factorial(2*n+2) ) for n in (-1..25)] # _G. C. Greubel_, Jul 03 2019
%o (GAP) List([-1..25], n-> NumeratorRat( (-1)^(n+1)*4^(n+1)* Bernoulli(2*n+2)/Factorial(2*n+2) )) # _G. C. Greubel_, Jul 03 2019
%Y Cf. A000182, A036278 (denominators).
%K sign,frac,easy,nice
%O -1,4
%A _N. J. A. Sloane_