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-6 of 6 results.

A196840 Duplicate of A162298.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 0, 1, 1, 1, 0, -1, 0, 5, 1, 1, 1, 0, -1, 0, 1, 1, 1, 0, 1, 0, -7, 0, 7, 1, 1, -1, 0, 2, 0, -7, 0, 2, 1, 1, 0, -3, 0, 1, 0, -7, 0, 3, 1, 1, 5, 0, -1, 0, 1, 0, -1, 0, 5, 1, 1
Offset: 0

Views

Author

Wolfdieter Lang, Oct 23 2011

Keywords

Comments

Duplicate of A162298. - Joerg Arndt, May 27 2019
The sums of the k-th power of each of the first n positive integers, sum(j^k,j=1..n), k>=0, n>=1, abbreviated usually as Sigma n^k, can be written as Sigma n^k = sum(r(k,m)*n^m,m=1..k+1), with the rational number triangle r(n,m)=a(n,m)/A162299(k+1,m). See, e.g., the Graham et al. reference, eq. (6.78), p. 269, where Sigma n^k is S_k(n+1) - delta(k,0), with delta(k,0)=1 if k=0 and 0 else. The formula for r(n,m) given below can be adapted from this reference, and it is found in the given form (for k>0) in the Remmert reference, p. 175.
For sums of powers of integers see the array A103438 with further references and links.

Examples

			The triangle a(k,m) starts with
k\m  1   2  3  4  5  6  7  8  9 10 11 ...
0:   1
1:   1   1
2:   1   1  1
3:   0   1  1  1
4:  -1   0  1  1  1
5:   0  -1  0  5  1  1
6:   1   0 -1  0  1  1  1
7:   0   1  0 -7  0  7  1  1
8:  -1   0  2  0 -7  0  2  1  1
9:   0  -3  0  1  0 -7  0  3  1  1
10:  5   0 -1  0  1  0 -1  0  5  1  1
...
The rational number triangle a(k,m)/A162299(k+1,m) starts with
k\m  1     2     3     4     5      6    7    8    9 ...
0:   1
1:  1/2   1/2
2:  1/6   1/2   1/3
3:   0    1/4   1/2   1/4
4: -1/30   0    1/3   1/2   1/5
5:   0   -1/12   0   5/12   1/2    1/6
6:  1/42   0   -1/6    0    1/2    1/2  1/7
7:   0    1/12   0   -7/24   0    7/12  1/2  1/8
8: -1/30   0    2/9    0   -7/15    0   2/3  1/2  1/9
...
Sigma n^4 = sum(j^4,j=1..n) =
-(1/30)*n + (1/3)*n^3 +  (1/2)*n^4 + (1/5)*n^5.
For n>=1 this is the sequence A000538(n).
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1991 (Seventh printing).Second ed. 1994.
  • R. Remmert, Funktionentheorie I, Zweite Auflage, Springer-Verlag, 1989. English version: Classical topics in complex function theory, Springer, 1998.

Crossrefs

Programs

  • Mathematica
    row[k_] := Numerator[ Rest[ CoefficientList[ HarmonicNumber[n, -k], n]]]; Flatten[ Table[ row[k], {k, 0, 10}]] (* Jean-François Alcover, Dec 07 2011 *)

Formula

a(k,m)= numerator(r(k,m)) with
r(k,m)= 1/(k+1) if m=k+1, 1/2 if m=k, and (B(k+1-m)/(k+1-m))*binomial(k,m) if m = 1,...,k-1, with the Bernoulli numbers B(n)=A027641(n)/A027642(n).
Another version, involving Stirling numbers is
r(k,m) = ((-1)^(k+1-m))*sum(S(k,l)*s(l+1,m)/(l+1),l=(m-1),...,k), k>=0, m=1,...,k+1, with the Stirling numbers of the second kind S, given in A048993, and of the first kind s, given in A048994. For this formula see the W. Lang link under A196837, addendum.

A162299 Faulhaber's triangle: triangle T(k,y) read by rows, giving denominator of the coefficient [m^y] of the polynomial Sum_{x=1..m} x^(k-1).

Original entry on oeis.org

1, 2, 2, 6, 2, 3, 1, 4, 2, 4, 30, 1, 3, 2, 5, 1, 12, 1, 12, 2, 6, 42, 1, 6, 1, 2, 2, 7, 1, 12, 1, 24, 1, 12, 2, 8, 30, 1, 9, 1, 15, 1, 3, 2, 9, 1, 20, 1, 2, 1, 10, 1, 4, 2, 10, 66, 1, 2, 1, 1, 1, 1, 1, 6, 2, 11, 1, 12, 1, 8, 1, 6, 1, 8, 1, 12, 2, 12, 2730, 1, 3, 1, 10, 1, 7, 1, 6, 1, 1, 2, 13, 1, 420, 1, 12, 1, 20, 1, 28, 1, 60, 1, 12, 2, 14, 6, 1, 90, 1, 6, 1, 10, 1, 18, 1, 30, 1, 6, 2, 15
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jun 30 2009 and Jul 02 2009

Keywords

Comments

There are many versions of Faulhaber's triangle: search the OEIS for his name. For example, A220862/A220963 is essentially the same as this triangle, except for an initial column of 0's. - N. J. A. Sloane, Jan 28 2017

Examples

			The first few polynomials:
    m;
   m/2  + m^2/2;
   m/6  + m^2/2 + m^3/3;
    0   + m^2/4 + m^3/2 + m^4/4;
  -m/30 +   0   + m^3/3 + m^4/2 + m^5/5;
  ...
Initial rows of Faulhaber's triangle of fractions H(n, k) (n >= 0, 1 <= k <= n+1):
    1;
   1/2,  1/2;
   1/6,  1/2,  1/3;
    0,   1/4,  1/2,  1/4;
  -1/30,  0,   1/3,  1/2,  1/5;
    0,  -1/12,  0,   5/12, 1/2,  1/6;
   1/42,  0,  -1/6,   0,   1/2,  1/2,  1/7;
    0,   1/12,  0,  -7/24,  0,   7/12, 1/2,  1/8;
  -1/30,  0,   2/9,   0,  -7/15,  0,   2/3,  1/2,  1/9;
  ...
The triangle starts in row k=1 with columns 1<=y<=k as
     1
     2   2
     6   2  3
     1   4  2  4
    30   1  3  2  5
     1  12  1 12  2  6
    42   1  6  1  2  2  7
     1  12  1 24  1 12  2  8
    30   1  9  1 15  1  3  2  9
     1  20  1  2  1 10  1  4  2 10
    66   1  2  1  1  1  1  1  6  2 11
     1  12  1  8  1  6  1  8  1 12  2 12
  2730   1  3  1 10  1  7  1  6  1  1  2 13
     1 420  1 12  1 20  1 28  1 60  1 12  2 14
     6   1 90  1  6  1 10  1 18  1 30  1  6  2 15
  ...
Initial rows of triangle of fractions:
    1;
   1/2, 1/2;
   1/6, 1/2,  1/3;
    0,  1/4,  1/2,  1/4;
  -1/30, 0,   1/3,  1/2,  1/5;
    0, -1/12,  0,   5/12, 1/2,  1/6;
   1/42, 0,  -1/6,   0,   1/2,  1/2,  1/7;
    0,  1/12,  0,  -7/24,  0,   7/12, 1/2,  1/8;
  -1/30, 0,   2/9,   0,  -7/15,  0,   2/3,  1/2,  1/9;
  ...
		

Crossrefs

Cf. A000367, A162298 (numerators).
See also A220962/A220963.

Programs

  • Maple
    A162299 := proc(k,y) local gf,x; gf := sum(x^(k-1),x=1..m) ; coeftayl(gf,m=0,y) ; denom(%) ; end proc: # R. J. Mathar, Jan 24 2011
    # To produce Faulhaber's triangle of fractions H(n,k) (n >= 0, 1 <= k <= n+1):
    H:=proc(n,k) option remember; local i;
    if n<0 or k>n+1 then 0;
    elif n=0 then 1;
    elif k>1 then (n/k)*H(n-1,k-1);
    else 1 - add(H(n,i),i=2..n+1); fi; end;
    for n from 0 to 10 do lprint([seq(H(n,k),k=1..n+1)]); od:
    for n from 0 to 12 do lprint([seq(numer(H(n,k)),k=1..n+1)]); od: # A162298
    for n from 0 to 12 do lprint([seq(denom(H(n,k)),k=1..n+1)]); od: # A162299 # N. J. A. Sloane, Jan 28 2017
  • Mathematica
    H[n_, k_] := H[n, k] = Which[n < 0 || k > n+1, 0, n == 0, 1, k > 1, (n/k)* H[n - 1, k - 1], True, 1 - Sum[H[n, i], {i, 2, n + 1}]];
    Table[H[n, k] // Denominator, {n, 0, 14}, {k, 1, n + 1}] // Flatten (* Jean-François Alcover, Aug 04 2022 *)

Formula

Faulhaber's triangle of fractions H(n,k) (n >= 0, 1 <= k <= n+1) is defined by: H(0,1)=1; for 2<=k<=n+1, H(n,k) = (n/k)*H(n-1,k-1) with H(n,1) = 1 - Sum_{i=2..n+1}H(n,i). - N. J. A. Sloane, Jan 28 2017
Sum_{x=1..m} x^(k-1) = (Bernoulli(k,m+1)-Bernoulli(k))/k.

Extensions

Offset set to 0 by Alois P. Heinz, Feb 19 2021

A220962 Faulhaber’s triangle: triangle of numerators of coefficients of power-sum polynomials.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, -1, 0, 1, 1, 1, 0, 0, -1, 0, 5, 1, 1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 0, 1, 0, -7, 0, 7, 1, 1, 0, -1, 0, 2, 0, -7, 0, 2, 1, 1, 0, 0, -3, 0, 1, 0, -7, 0, 3, 1, 1, 0, 5, 0, -1, 0, 1, 0, -1, 0, 5, 1, 1
Offset: 0

Views

Author

Jean-François Alcover, Dec 27 2012

Keywords

Comments

This version of Faulhaber's triangle, A220962/A220963, is essentially the same as A162298/A162299 except for having an extra column of 0's. See A162298/A162299 for further information. - N. J. A. Sloane, Jan 28 2017

Examples

			Rows start:
0,1;
0,1,1;
0,1,1,1;
0,0,1,1,1;
0,-1,0,1,1,1;
0,0,-1,0,5,1,1;
0,1,0,-1,0,1,1,1;
0,0,1,0,-7,0,7,1,1;
0,-1,0,2,0,-7,0,2,1,1;
...
		

Crossrefs

Cf. A220963 (denominators).
See also A162298/A162299.

Programs

  • Mathematica
    f[n_, x_] := f[n,x]=((x + 1)^(n + 1) - 1)/(n + 1) - Sum[Binomial[n + 1, k]*f[k, x], {k , 0, n - 1}]/(n + 1); f[0, x_] := x; row[n_] := CoefficientList[f[n, x], x] // Numerator; Table[row[n], {n, 0, 10}] // Flatten

A220963 Faulhaber’s triangle: triangle of denominators of coefficients of power-sum polynomials.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 6, 2, 3, 1, 1, 4, 2, 4, 1, 30, 1, 3, 2, 5, 1, 1, 12, 1, 12, 2, 6, 1, 42, 1, 6, 1, 2, 2, 7, 1, 1, 12, 1, 24, 1, 12, 2, 8, 1, 30, 1, 9, 1, 15, 1, 3, 2, 9, 1, 1, 20, 1, 2, 1, 10, 1, 4, 2, 10, 1, 66, 1, 2, 1, 1, 1, 1, 1, 6, 2, 11
Offset: 0

Views

Author

Jean-François Alcover, Dec 27 2012

Keywords

Comments

This version of Faulhaber's triangle, A220962/A220963, is essentially the same as A162298/A162299 except for having an extra column of 0's. See A162298/A162299 for further information. - N. J. A. Sloane, Jan 28 2017

Examples

			Rows start:
0,1;
0,1,1;
0,1,1,1;
0,0,1,1,1;
0,-1,0,1,1,1;
0,0,-1,0,5,1,1;
0,1,0,-1,0,1,1,1;
0,0,1,0,-7,0,7,1,1;
0,-1,0,2,0,-7,0,2,1,1;
...
		

Crossrefs

Cf. A220962 (numerators).
See also A162298/A162299.

Programs

  • Mathematica
    f[n_, x_] := f[n,x]=((x + 1)^(n + 1) - 1)/(n + 1) - Sum[Binomial[n + 1, k]*f[k, x], {k , 0, n - 1}]/(n + 1); f[0, x_] := x; row[n_] := CoefficientList[f[n, x], x] // Numerator; Table[row[n], {n, 0, 10}] // Flatten

A335951 Triangle read by rows. The numerators of the coefficients of the Faulhaber polynomials. T(n,k) for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, -1, 4, 0, 0, 1, -4, 6, 0, 0, -3, 12, -20, 16, 0, 0, 5, -20, 34, -32, 16, 0, 0, -691, 2764, -4720, 4592, -2800, 960, 0, 0, 105, -420, 718, -704, 448, -192, 48, 0, 0, -10851, 43404, -74220, 72912, -46880, 21120, -6720, 1280
Offset: 0

Views

Author

Peter Luschny, Jul 16 2020

Keywords

Comments

There are many versions of Faulhaber's triangle: search the OEIS for his name.
Faulhaber's claim (in 1631) is: S_{2*m-1} = 1^(2*m-1) + 2^(2*m-1) + ... + n^(2*m-1) = F_m((n^2+2)/2). The first proof was given by Jacobi in 1834.
For the Faulhaber numbers see A354042 and A354043.

Examples

			The first few polynomials are:
  [0] 1;
  [1] x;
  [2] x^2;
  [3] (4*x - 1)*x^2*(1/3);
  [4] (6*x^2 - 4*x + 1)*x^2*(1/3);
  [5] (16*x^3 - 20*x^2 + 12*x - 3)*x^2*(1/5);
  [6] (16*x^4 - 32*x^3 + 34*x^2 - 20*x + 5)*x^2*(1/3);
  [7] (960*x^5 - 2800*x^4 + 4592*x^3 - 4720*x^2 + 2764*x - 691)*x^2*(1/105);
  [8] (48*x^6 - 192*x^5 + 448*x^4 - 704*x^3 + 718*x^2 - 420*x + 105)*x^2*(1/3);
  [9] (1280*x^7-6720*x^6+21120*x^5-46880*x^4+72912*x^3-74220*x^2+43404*x-10851)*x^2*(1/45);
Triangle starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 0,  1;
  [3] 0, 0, -1,     4;
  [4] 0, 0,  1,    -4,      6;
  [5] 0, 0, -3,     12,    -20,    16;
  [6] 0, 0,  5,    -20,     34,   -32,     16;
  [7] 0, 0, -691,   2764,  -4720,  4592,  -2800,  960;
  [8] 0, 0,  105,  -420,    718,  -704,    448,  -192,    48;
  [9] 0, 0, -10851, 43404, -74220, 72912, -46880, 21120, -6720, 1280;
		

References

  • Johann Faulhaber, Academia Algebra. Darinnen die miraculosische Inventiones zu den höchsten Cossen weiters continuirt und profitiert werden. Johann Ulrich Schönigs, Augsburg, 1631.

Crossrefs

Cf. A335952 (polynomial denominators), A000012 (row sums of the polynomial coefficients).
Other representations of the Faulhaber polynomials include A093556/A093557, A162298/A162299, A220962/A220963.
Cf. A354042 (Faulhaber numbers), A354043.

Programs

  • Maple
    FaulhaberPolynomial := proc(n) if n = 0 then return 1 fi;
    expand((bernoulli(2*n, x+1) - bernoulli(2*n,1))/(2*n));
    sort(simplify(expand(subs(x = (sqrt(8*x+1)-1)/2, %))), [x], ascending) end:
    Trow := n -> seq(coeff(numer(FaulhaberPolynomial(n)), x, k), k=0..n):
    seq(print(Trow(n)), n=0..9);
  • Python
    from math import lcm
    from itertools import count, islice
    from sympy import simplify,sqrt,bernoulli
    from sympy.abc import x
    def A335951_T(n,k):
        z = simplify((bernoulli(2*n,(sqrt(8*x+1)+1)/2)-bernoulli(2*n,1))/(2*n)).as_poly().all_coeffs()
        return z[n-k]*lcm(*(d.q for d in z))
    def A335951_gen(): # generator of terms
        yield from (A335951_T(n,k) for n in count(0) for k in range(n+1))
    A335951_list = list(islice(A335951_gen(),20)) # Chai Wah Wu, May 16 2022
    
  • SageMath
    def A335951Row(n):
        R. = PolynomialRing(QQ)
        if n == 0: return [1]
        b = expand((bernoulli_polynomial(x + 1, 2*n) -
                    bernoulli_polynomial(1, 2*n))/(2*n))
        s = expand(b.subs(x = (sqrt(8*x+1)-1)/2))
        return numerator(s).list()
    for n in range(10): print(A335951Row(n)) # Peter Luschny, May 17 2022

Formula

Let F_n(x) be the polynomial after substituting (sqrt(8*x + 1) - 1)/2 for x in b_n(x), where b_n(x) = (Bernoulli_{2*n}(x+1) - Bernoulli_{2*n}(1))/(2*n).
F_n(1) = 1 for all n >= 0.
T(n, k) = numerator([x^k] F_n(x)).

A168140 Sum of n-th numerator and n-th denominator in triangle formed from Bernoulli numbers.

Original entry on oeis.org

2, 3, 3, 7, 4, 7, 1, 7, 7, 1, 29, 31, 17, 31, 29, 1, 29, 16, 16, 29, 1, 43, 41, 104, 113, 104, 41, 43, 1, 43, 20, 109, 109, 20, 43, 1, 29, 31, 104, 101, 113, 101, 104, 31, 29, 1, 29, 16, 97, 109, 109, 97, 16, 29, 1, 71, 61, 172, 169, 1039, 263, 1039, 169, 172, 61, 71, 1, 71, 28, 197, 137, 247, 247, 137, 197, 28, 71, 1
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Nov 19 2009

Keywords

Comments

Terms become negative later in the sequence. - R. J. Mathar, Apr 14 2010

Crossrefs

Programs

  • Maple
    b := proc(n, k) option remember; if k = 0 then (-1)^n*bernoulli(n) ; elif k > n/2 then procname(n, n-k) ; else procname(n-1, k-1)-procname(n, k-1) ; end if; end proc: T := proc(n, k) numer(b(n, k))+denom(b(n, k)) ; end proc: seq(seq(T(n,k), k=0..n), n=0..10); # R. J. Mathar, Apr 14 2010
  • Mathematica
    b[n_, 0] := (-1)^n BernoulliB[n];
    b[n_, k_] := b[n, k] = b[n - 1, k - 1] - b[n, k - 1];
    T[n_, k_] := Numerator[b[n, k]] + Denominator[b[n, k]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 21 2020 *)

Formula

a(n) = A085737(n) + A085738(n).

Extensions

A 109 duplicated, 1049 replaced with 1039 by R. J. Mathar, Apr 14 2010
Showing 1-6 of 6 results.