cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A051716 Numerators of Bernoulli twin numbers C(n).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The Bernoulli twin numbers C(n) are defined by C(0) = 1, then C(2n) = B(2n) + B(2n-1), C(2n+1) = -B(2n+1) - B(2n), where B() are the Bernoulli numbers A027641/A027642. The definition is due to Paul Curtz.
For denominators see A051717.
Negatives of numerators of column 1 of table described in A051714/A051715.

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, ...
		

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