A051716 Numerators of Bernoulli twin numbers C(n).
1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 5, -5, -691, 691, 7, -7, -3617, 3617, 43867, -43867, -174611, 174611, 854513, -854513, -236364091, 236364091, 8553103, -8553103, -23749461029, 23749461029, 8615841276005, -8615841276005, -7709321041217, 7709321041217, 2577687858367
Offset: 0
Examples
The C(n) sequence is 1, -1/2, -1/3, -1/6, -1/30, 1/30, 1/42, -1/42, -1/30, 1/30, 5/66, -5/66, -691/2730, 691/2730, 7/6, -7/6, ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..640
- M. Kaneko, The Akiyama-Tanigawa algorithm for Bernoulli numbers, J. Integer Sequences, 3 (2000), #00.2.9.
Crossrefs
Programs
-
Magma
f:= func< n | Bernoulli(n) + Bernoulli(n-1) >; function A051716(n) if n eq 0 then return 1; elif (n mod 2) eq 0 then return Numerator(f(n)); else return Numerator(-f(n)); end if; end function; [A051716(n): n in [0..50]]; // G. C. Greubel, Apr 22 2023
-
Maple
C:=proc(n) if n=0 then RETURN(1); fi; if n mod 2 = 0 then RETURN(bernoulli(n)+bernoulli(n-1)); else RETURN(-bernoulli(n)-bernoulli(n-1)); fi; end;
-
Mathematica
c[0]= 1; c[n_?EvenQ]:= BernoulliB[n] + BernoulliB[n-1]; c[n_?OddQ]:= -BernoulliB[n] - BernoulliB[n-1]; Table[Numerator[c[n]], {n,0,34}] (* Jean-François Alcover, Dec 19 2011 *)
-
PARI
a(n) = if (n==0, 1, nu = numerator(bernfrac(n)+bernfrac(n-1)); if (n%2, -nu, nu)); \\ Michel Marcus, Jan 29 2017
-
SageMath
def f(n): return bernoulli(n)+bernoulli(n-1) def A051716(n): if (n==0): return 1 elif (n%2==0): return numerator(f(n)) else: return numerator(-f(n)) [A051716(n) for n in range(51)] # G. C. Greubel, Apr 22 2023
Formula
Numerators of differences of the sequence of rational numbers 0 followed by A164555/A027642. - Paul Curtz, Jan 29 2017
The e.g.f. of the rationals a(n)/A051717(n) is -(1/x + x^2/2 + x/(1 - exp(x)) + dilog(exp(-x))), (with dilog(x) = polylog(2, 1-x)). From integrating the e.g.f. of the z-sequence (exp(x) - (1+x))/(exp(x) -1)^2 for the Bernoulli polynomials of the second kind (A290317 / A290318). - Wolfdieter Lang, Aug 07 2017
Extensions
More terms from James Sellers, Dec 08 1999
Edited by N. J. A. Sloane, May 25 2008
Comments