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.

Showing 1-9 of 9 results.

A002427 Numerator of (2n+1) B_{2n}, where B_n are the Bernoulli numbers.

Original entry on oeis.org

1, 1, -1, 1, -3, 5, -691, 35, -3617, 43867, -1222277, 854513, -1181820455, 76977927, -23749461029, 8615841276005, -84802531453387, 90219075042845, -26315271553053477373, 38089920879940267, -261082718496449122051, 1520097643918070802691
Offset: 0

Views

Author

Keywords

Examples

			(n+1)*B_n gives: 1, -1/2, 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66, ...
		

References

  • 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. 73.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Denominators are in A006955.

Programs

  • Magma
    [Numerator((2*n+1)*Bernoulli(2*n)): n in [1..30]]; // G. C. Greubel, Jul 03 2019
    
  • Maple
    gf := z / (1 - exp(-z)): ser := series(gf, z, 84):
    seq(numer((n+1)!*coeff(ser, z, n)), n=0..42, 2); # Peter Luschny, Aug 29 2020
  • Mathematica
    Table[Numerator[2(2n+1)BernoulliB[2n]], {n, 1, 30}]
  • PARI
    a(n) = numerator((2*n+1)*bernfrac(2*n)); \\ Michel Marcus, Aug 06 2017
    
  • Sage
    [numerator((2*n+1)*bernoulli(2*n)) for n in (1..30)] # G. C. Greubel, Jul 03 2019

A006955 Denominator of (2n+1) B_{2n}, where B_n are the Bernoulli numbers.

Original entry on oeis.org

1, 2, 6, 6, 10, 6, 210, 2, 30, 42, 110, 6, 546, 2, 30, 462, 170, 6, 51870, 2, 330, 42, 46, 6, 6630, 22, 30, 798, 290, 6, 930930, 2, 102, 966, 10, 66, 1919190, 2, 30, 42, 76670, 6, 680862, 2, 690, 38874, 470, 6, 46410, 2, 330, 42, 106, 6, 1919190
Offset: 0

Views

Author

Keywords

Comments

Also denominators of asymptotic expansion of polygamma function psi''(z).

Examples

			(n+1)*B_n gives the sequence 1, -1/2, 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66, ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 260, (6.4.13).
  • 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. 73.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Numerators are in A002427.

Programs

  • Maple
    gf := z / (1 - exp(-z)): ser := series(gf, z, 220):
    seq(denom((n+1)!*coeff(ser, z, n)), n=0..108, 2); # Peter Luschny, Aug 29 2020
  • Mathematica
    Denominator[Table[(2n+1)BernoulliB[2n],{n,0,60}]] (* Harvey P. Dale, Nov 03 2011 *)
  • PARI
    a(n) = denominator((2*n+1)*bernfrac(2*n)); \\ Michel Marcus, Aug 06 2017

Formula

Apparently a(n) = denominator(Sum_{k=0..2*n-1} (-1)^(2*n-k+1)*E1(2*n, k+1)/ binomial(2*n, k+1)), where E1(n, k) denotes the first-order Eulerian numbers A123125. - Peter Luschny, Feb 17 2021

A127187 Nearest integer to (n+1)*Bernoulli(n).

Original entry on oeis.org

1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 18, 0, -121, 0, 1044, 0, -11112, 0, 142419, 0, -2164506, 0, 38488964, 0, -791648701, 0, 18649007091, 0, -498838420314, 0, 15036512507141, 0, -507331242588268, 0, 19044960439970134, 0
Offset: 0

Views

Author

N. J. A. Sloane, Mar 26 2007

Keywords

Crossrefs

A127188 Nearest integer to (2*n+1)*Bernoulli(2*n).

Original entry on oeis.org

1, 1, 0, 0, 0, 1, -3, 18, -121, 1044, -11112, 142419, -2164506, 38488964, -791648701, 18649007091, -498838420314, 15036512507141, -507331242588268, 19044960439970134, -791159753019542794
Offset: 0

Views

Author

N. J. A. Sloane, Mar 26 2007

Keywords

Crossrefs

A050932 Denominator of (n+1)*Bernoulli(n).

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 6, 1, 10, 1, 6, 1, 210, 1, 2, 1, 30, 1, 42, 1, 110, 1, 6, 1, 546, 1, 2, 1, 30, 1, 462, 1, 170, 1, 6, 1, 51870, 1, 2, 1, 330, 1, 42, 1, 46, 1, 6, 1, 6630, 1, 22, 1, 30, 1, 798, 1, 290, 1, 6, 1, 930930, 1, 2, 1, 102, 1, 966, 1, 10, 1, 66, 1, 1919190
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 1999

Keywords

Comments

Apparently a(n) = denominator(Sum_{k=0..n-1} (-1)^(n-k+1)*E1(n, k+1)/binomial(n, k+1)), where E1(n, k) denotes the first-order Eulerian numbers A123125. - Peter Luschny, Feb 17 2021

Crossrefs

Programs

  • Haskell
    a050932 n = a050932_list !! n
    a050932_list = 1 : map (denominator . sum) (zipWith (zipWith (%))
       (zipWith (map . (*)) (drop 2 a000142_list) a242179_tabf) a106831_tabf)
    -- Reinhard Zumkeller, Jul 04 2014
    
  • Mathematica
    Denominator/@Table[(n+1)BernoulliB[n],{n,0,80}] (* Harvey P. Dale, May 19 2011 *)
  • PARI
    a(n)=denominator(bernfrac(n)*(n+1)) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from sympy import bernoulli, gcd
    def A050932(n):
        q = bernoulli(n).q
        return q//gcd(q,n+1) # Chai Wah Wu, Apr 02 2021

A106831 Define a triangle in which the entries are of the form +-1/(b!c!d!e!...), where the order of the factorials is important; read the triangle by rows and record and expand the denominators.

Original entry on oeis.org

2, 6, 4, 24, 12, 12, 8, 120, 48, 36, 24, 48, 24, 24, 16, 720, 240, 144, 96, 144, 72, 72, 48, 240, 96, 72, 48, 96, 48, 48, 32, 5040, 1440, 720, 480, 576, 288, 288, 192, 720, 288, 216, 144, 288, 144, 144, 96, 1440, 480, 288, 192, 288, 144, 144, 96, 480, 192, 144, 96, 192
Offset: 0

Views

Author

N. J. A. Sloane, May 22 2005

Keywords

Comments

Row n has 2^n terms. Row 0 is +1/2!. An entry +-1/b!c!d!... has two children, a left child -+1/(a+1)!b!c!... and a right child +-1/2!b!c!d!...
Let S_n = sum of entries in row n of the triangle. Then for n > 0, n!S_{n-1} is the Bernoulli number B_n.

Examples

			Woon's "Bernoulli Tree" begins like this (see also the given Wikipedia-link). This sequence gives the values of the denominators:
                                     +1
                                    ────
                                     2!
                 -1                 /  \                  +1
                ──── ............../    \.............. ─────
                 3!                                      2!2!
        +1        .         -1                 -1         .         +1
       ────      / \       ────               ────       / \      ──────
        4! ...../   \..... 2!3!               3!2! ...../   \.... 2!2!2!
       / \                 / \                 / \                 / \
      /   \               /   \               /   \               /   \
     /     \             /     \             /     \             /     \
    -1      +1         +1       -1         +1      -1          -1       +1
   ────    ────       ────     ──────     ────   ──────      ──────  ────────
    5!     2!4!       3!3!     2!2!3!     4!2!   2!3!2!      3!2!2!  2!2!2!2!
etc.
		

Crossrefs

Cf. A242179 (numerators), A050925, A050932, A000142.
Cf. A323505 (mirror image), and also A005940, A283477, A322827 for other similar trees.

Programs

  • Haskell
    a106831 n k = a106831_tabf !! n !! n
    a106831_row n = a106831_tabf !! n
    a106831_tabf = map (map (\(, , left, right) -> left * right)) $
       iterate (concatMap (\(x, f, left, right) -> let f' = f * x in
       [(x + 1, f', f', right), (3, 2, 2, left * right)])) [(3, 2, 2, 1)]
    -- Reinhard Zumkeller, May 05 2014
    
  • Maple
    Contribution from Peter Luschny, Jun 12 2009: (Start)
    The routine computes the triangle row by row and gives the numbers with their sign.
    Thus A(1)=[2]; A(2)=[ -6,4]; A(3)=[24,-12,-12,8]; etc.
    A := proc(n) local k, i, j, m, W, T; k := 2;
    W := array(0..2^n); W[1] := [1,`if`(n=0,1,2)];
    for i from 1 to n-1 do for m from k by 2 to 2*k-1 do
    T := W[iquo(m,2)]; W[m] := [ -T[1],T[2]+1,seq(T[j],j=3..nops(T))];
    W[m+1] := [T[1],2,seq(T[j],j=2..nops(T))]; od; k := 2*k; od;
    seq(W[i][1]*mul(W[i][j]!,j=2..nops(W[i])),i=iquo(k,2)..k-1) end:
    seq(print(A(i)),i=1..5); (End)
  • Mathematica
    a [n_] := Module[{k, i, j, m, w, t}, k = 2; w = Array[0&, 2^n]; w[[1]] := {1, If[n == 0, 1, 2]}; For[i = 1, i <= n-1, i++, For[m = k, m <= 2*k-1 , m = m+2, t = w[[Quotient[m, 2]]]; w[[m]] = {-t[[1]], t[[2]]+1, Sequence @@ Table[t[[j]], {j, 3, Length[t]}]}; w[[m+1]] = {t[[1]], 2, Sequence @@ Table[t[[j]], {j, 2, Length[t]}]}]; k = 2*k]; Table[w[[i, 1]]*Product[w[[i, j]]!, {j, 2, Length[w[[i]]]}], {i, Quotient[k, 2], k-1}]]; Table[a[i] , {i, 1, 6}] // Flatten // Abs (* Jean-François Alcover, Dec 20 2013, translated from Maple *)
  • PARI
    A106831off1(n) = if(!n,1, my(rl=1, m=1); while(n,if(!(n%2), rl++, m *= ((1+rl)!); rl=1); n >>= 1); (m));
    A106831(n) = A106831off1(1+n); \\ Antti Karttunen, Jan 16 2019
    
  • PARI
    A001511(n) = (1+valuation(n,2));
    A106831r1(n) = if(!n,1,if(n%2, 2*A106831r1((n-1)/2), (1+A001511(n))*A106831r1(n/2))); \\ Implements the given recurrence.
    A106831(n) = A106831r1(1+n); \\ Antti Karttunen, Jan 16 2019

Formula

From Antti Karttunen, Jan 16 2019: (Start)
If sequence is shifted one term to the right, then the following recurrence works:
a(0) = 1; and for n > 0, a(2n) = (1+A001511(2n))*a(n), a(2n+1) = 2*a(n).
(End)

Extensions

More terms from Franklin T. Adams-Watters, Apr 28 2006
Example section reillustrated by Antti Karttunen, Jan 16 2019

A229979 Numerators of interleaved A063524(n) and A002427(n)/A006955(n).

Original entry on oeis.org

0, 1, 1, 1, 0, -1, 0, 1, 0, -3, 0, 5, 0, -691, 0, 35, 0, -3617, 0, 43867, 0, -1222277, 0, 854513, 0, -1181820455, 0, 76977927, 0, -23749461029, 0, 8615841276005, 0, -84802531453387, 0, 90219075042845, 0
Offset: 0

Views

Author

Paul Curtz, Oct 05 2013

Keywords

Comments

Numerators of Br(n) = 0, 1, 1, 1/2, 0, -1/6, 0, 1/6, 0, -3/10, 0, 5/6, 0, -691/210,... complementary Bernoulli numbers.
A164555(n)/A027642(n) is an autosequence of second kind. Its inverse binomial transform is the signed sequence and its main diagonal is the double of the first upper diagonal.
Br(n) is an autosequence of first kind. Its inverse binomial transform is the signed sequence and its main diagonal is A000004=0's.
Br(n) difference table:
0, 1, 1, 1/2, 0, -1/6,...
1, 0, -1/2, -1/2, -1/6, 1/6,... =A140351(n)/A140219(n)
-1, -1/2, 0, 1/3, 1/3, 0,...
1/2, 1/2, 1/3, 0, -1/3, -1/3,...
0, -1/6, -1/3, -1/3, 0, 8/15,...
-1/6, -1/6, 0, 1/3, 8/15, 0,... etc.

Crossrefs

Cf. A050925: a similar sequence, because 2*(n+1)*B(n) and (n+1)*B(n) have the same numerator.

Programs

  • Mathematica
    a[0] = 0; a[1] = a[2] = 1; a[n_] := 2*n*BernoulliB[n-1] // Numerator; Table[a[n], {n, 0, 36}] (* Jean-François Alcover, Nov 25 2013 *)

Formula

a(2n)=A063524(n). a(2n+1)=A002427(n).
a(n) = numerators of n * b(n) with b(n)=0 followed by A164555(n)/A027642(n) = 0, 1, 1/2, 1/6, 0,... in A165142(n).
a(n+1) = numerators of Br(n+1) = Br(n) + A140351(n)/A140219(n), a(0)=Br(0)=0.

Extensions

Cross-ref. to A050925 by Jean-François Alcover, Dec 09 2013

A227985 Numerators of the fractional triangle T(n,k) = binomial(n-1,k)*B_k for 0 <= k < n.

Original entry on oeis.org

1, 0, -1, 0, -1, 1, 0, -1, 1, -1, 0, -1, 1, -1, 0, 0, -1, 1, -5, 0, 1, 0, -1, 1, -1, 0, 1, 0, 0, -1, 1, -7, 0, 7, 0, -1, 0, -1, 1, -2, 0, 7, 0, -2, 0, 0, -1, 1, -3, 0, 7, 0, -1, 0, 3, 0, -1, 1, -5, 0, 1, 0, -1, 0, 1, 0, 0, -1, 1, -11, 0, 11, 0, -11, 0, 11, 0, -5, 0, -1, 1, -1, 0, 11, 0, -22, 0, 33, 0, -5, 0
Offset: 0

Views

Author

Paul Curtz, Aug 02 2013

Keywords

Comments

The n-th row's sum equals the n-th Bernoulli number (with B_1 = -1/2).
Starting from B_0 = 1, the successive B n comes from the equations written with the triangle A074909
1*B_0 +2*B_1 = 0 --> B_1 = 0 -1/2
1*B_0 +3*B_1 +3*B_2 = 0 --> B_2 = 0 -1/3 +1/2
1*B_0 +4*B_1 +6*B_2 +4*B_3 = 0 --> B_3 = 0 -1/4 +1/2 -1/4,
from the terms at the left-hand side. See A159688.
Main diagonal: 1, -1/2, 1/2, -1/4, 0, 1/12, 0, -1/12, 0, 3/20, 0, -5/12, 0, 691/420,... . After the initial 1, the numerators are given by -A050925.

Examples

			Triangle begins:
1,
0, -1,
0, -1, 1,
0, -1, 1, -1,
0, -1, 1, -1, 0,
0, -1, 1, -5, 0, 1,
0  -1, 1, -1, 0, 1,  0,
0, -1, 1, -7, 0, 7,  0, -1,
0, -1, 1, -2, 0, 7,  0, -2, 0, etc.
		

Crossrefs

Programs

  • Magma
    [1] cat [Numerator(-Binomial(n,k)*Bernoulli(k)/n): k in [-1..n-2], n in [2..15]]; // Bruno Berselli, Sep 09 2013
  • Mathematica
    b[0] = 1; b[1] = -1/2; row[0] = {1}; row[1] = {0, -1/2}; row[n_] := Join[{0}, List @@ (-Sum[Binomial[n+1, k]*B[k], {k, 0, n-1}]/(n+1) // Expand) /. B -> b]; b[n_] := Total[row[n]]; Table[row[n] // Numerator, {n, 0, 12}] // Flatten (* Jean-François Alcover, Aug 12 2013 *)
  • PARI
    t(n, k) = if (n==1, 1, if (k== -1, 0, -bernfrac(k)*binomial(n, k)/n));
    tabl(nn) = {for (n = 1, nn, for (k = -1, n-2, print1(t(n, k), ", ");); print(););} \\ Michel Marcus, Sep 07 2013
    

Extensions

More terms from Jean-François Alcover, Aug 12 2013

A242246 Numerators of n*A164555(n-1)/A027642(n-1).

Original entry on oeis.org

0, 1, 1, 1, 0, -1, 0, 1, 0, -3, 0, 5, 0, -691, 0, 35, 0, -3617, 0, 43867, 0, -1222277, 0, 854513, 0, -1181820455, 0, 76977927, 0, -23749461029, 0, 8615641276005, 0, -84802531453387, 0, 90219075042845, 0
Offset: 0

Views

Author

Paul Curtz, May 09 2014

Keywords

Comments

First multiplied shifted (second) Bernoulli numbers.
A164555(n-1)/A027642(n-1) = 0 followed by (A164555(n)/A027642(n)=1, 1/2, 1/6,...) = f(n) = 0, 1, 1/2, 1/6, 0,... .
f(n+1) - f(n) = A051716(n)/A051717(n).
Generally we consider a transform applied to the autosequences of first or second kind. An autosequence is a sequence which has its inverse binomial transform equal to the signed sequence. It is of the first kind if the main diagonal is A000004=0's. It is of the second kind if the main diagonal is the first upper diagonal multiplied by 2. A000045(n) is an autosequence of the first kind. A164555(n)/A027642(n) is an autosequence of the second kind. See A190339 (and A241269).
Here we apply the transform to the Bernoulli numbers A164555(n)/A027642(n).
We take n*(0 followed by A164555(n)/A027642(n)).
Hence the autosequence of first kind
TB1(n) = 0, 1, 1, 1/2, 0, -1/6, 0, 1/6, 0, -3/10, 0, 5/6, O, -691/210,.. .
a(n) are the numerators.
The first seven rows of the differencece table of TB1(n) are
0, 1, 1, 1/2, 0, - 1/6, 0, 1/6,...
1, 0, -1/2, -1/2, -1/6, 1/6, 1/6, -1/6,... =A140351(n+1)/b(n+1)
-1, -1/2, 0, 1/3, 1/3, 0, -1/3, -2/15,...
1/2, 1/2, 1/3, 0, -1/3, -1/3, 1/5, 11/15,...
0, -1/6, -1/3, -1/3, 0, 8/15, 8/15, -4/5,...
-1/6, -1/6, 0, 1/3, 8/15, 0, -4/3, -4/3,...
0, 1/6, 1/3, 1/5, -8/15, -4/3, 0, 512/105,... .
First and second upper diagonals: 1, -1/2, 1/3, -1/3, 8/15, -4/3, 512/105,... .
Sum of the antidiagonals:
0, 1, 1, 0, -1/2, 0, 1/2, 0, -5/6, 0, 13/6, 0, -49/6, 0,... .
(Note that the same transform applied to the second fractional Euler numbers A198631(n)/A006519(n+1) yields the Genocchi numbers -A226158(n)).
This transform can be continued:
TB2(n) = n*(0 followed by TB1(n)) =
0, 0, 2, 3, 2, 0, -1, 0, 4/3, 0, -3, 0, 10, 0, -691/15, 0, 280, 0,...
is an autosequence of second kind.
TB3(n) = 0, 0, 0, 6, 12, 10, 0, -7, 0, 12, 0, -33, 0, 130, 0, 691, 0,...
is apparently an integer autosequence of the first kind.

Crossrefs

Cf. A199969 (autosequence).

Formula

a(n) = 0 followed by (A050925(n) = 1, -1, 1, 0,... ) with 1 instead of -1.
a(2n) = A063524(n). a(2n+1) = A002427(n).
Showing 1-9 of 9 results.