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

A047654 Expansion of (Product_{j>=1} (1-(-x)^j) - 1)^2 in powers of x.

Original entry on oeis.org

1, -2, 1, 0, -2, 2, -2, 2, 1, 0, 2, -2, 3, 0, 2, 0, 0, 2, -2, 0, -2, 2, -1, 0, 0, -2, -2, -2, 1, -2, 0, -2, -2, 0, 2, 0, -2, 0, -2, 0, 0, 0, 1, 2, 0, 0, 2, 0, 2, 0, 1, 2, 0, -2, 2, 2, 0, 2, 0, 2, 0, 2, 2, 0, -4, 0, 0, 2, 1, -2, 0, -2, 0, 0, 0, 0, 2, -4, 1, 0, 0, -2, -2, -2, -2, 0, 0, -2, 0, 2, -2, 2, -2
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    m:=120;
    R:=PowerSeriesRing(Integers(), m);
    Coefficients(R!( ((&*[1-(-x)^j: j in [1..m+2]]) -1)^2 )); // G. C. Greubel, Sep 07 2023
    
  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, add(add([-d, d, -2*d, d]
          [1+irem(d, 4)], d=numtheory[divisors](j))*g(n-j), j=1..n)/n)
        end:
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(k=1, `if`(n=0, 0, g(n)),
          (q-> add(b(j, q)*b(n-j, k-q), j=0..n))(iquo(k, 2))))
        end:
    a:= n-> b(n, 2):
    seq(a(n), n=2..94);  # Alois P. Heinz, Feb 07 2021
  • Mathematica
    nmax=94; CoefficientList[Series[(Product[(1-(-x)^j), {j,nmax}] - 1)^2, {x, 0, nmax}], x]//Drop[#, 2] & (* Ilya Gutkovskiy, Feb 07 2021 *)
    With[{k=2}, Drop[CoefficientList[Series[(QPochhammer[-x] -1)^k, {x,0, 125}], x], k]] (* G. C. Greubel, Sep 07 2023 *)
  • PARI
    seq(n)={Vec((prod(j=1, n, 1-(-x)^j + O(x^n)) - 1)^2)} \\ Andrew Howroyd, Feb 07 2021
    
  • SageMath
    from sage.modular.etaproducts import qexp_eta
    m=125; k=2;
    def f(k,x): return (-1 + qexp_eta(QQ[['q']], m+2).subs(q=-x) )^k
    def A047654_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( f(k,x) ).list()
    a=A047654_list(m); a[k:] # G. C. Greubel, Sep 07 2023

Formula

a(n) = [x^n]( QPochhammer(-x) - 1 )^2. - G. C. Greubel, Sep 07 2023

Extensions

Definition and offset edited by Ilya Gutkovskiy, Feb 07 2021

A047655 Expansion of (Product_{j>=1} (1-(-x)^j) - 1)^3 in powers of x.

Original entry on oeis.org

1, -3, 3, -1, -3, 6, -6, 6, 0, -3, 6, -9, 8, -6, 0, 0, -6, 6, -13, 3, -6, 3, 0, -3, 6, -9, 6, -3, 6, 0, 6, 6, -3, 11, 0, 6, 0, 9, 0, 0, 0, -3, 13, 0, 0, -6, 0, -6, 3, -3, -6, 0, -15, -6, -3, 0, -6, 0, -6, 0, -6, -6, 0, -11, 0, 0, -6, 0, 6, 0, 6, 0, 0, 0, -3, 19, 12, -3, 0, 0, 6, 6, 6, 6, 0, 0, 6, 0, 21, 3
Offset: 3

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    m:=120;
    R:=PowerSeriesRing(Integers(), m);
    Coefficients(R!( ((&*[1-(-x)^j: j in [1..m+2]]) -1)^3 )); // G. C. Greubel, Sep 07 2023
    
  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, add(add([-d, d, -2*d, d]
          [1+irem(d, 4)], d=numtheory[divisors](j))*g(n-j), j=1..n)/n)
        end:
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(k=1, `if`(n=0, 0, g(n)),
          (q-> add(b(j, q)*b(n-j, k-q), j=0..n))(iquo(k, 2))))
        end:
    a:= n-> b(n, 3):
    seq(a(n), n=3..92);  # Alois P. Heinz, Feb 07 2021
  • Mathematica
    nmax=92; CoefficientList[Series[(Product[(1-(-x)^j), {j,nmax}] - 1)^3, {x,0,nmax}], x]//Drop[#, 3] & (* Ilya Gutkovskiy, Feb 07 2021 *)
    With[{k=3}, Drop[CoefficientList[Series[(QPochhammer[-x] -1)^k, {x,0, 125}], x], k]] (* G. C. Greubel, Sep 07 2023 *)
  • PARI
    my(x='x+O('x^99)); Vec((eta(-x)-1)^3) \\ Joerg Arndt, Sep 07 2023
  • SageMath
    from sage.modular.etaproducts import qexp_eta
    m=125; k=3;
    def f(k,x): return (-1 + qexp_eta(QQ[['q']], m+2).subs(q=-x) )^k
    def A047655_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( f(k,x) ).list()
    a=A047655_list(m); a[k:] # G. C. Greubel, Sep 07 2023
    

Formula

a(n) = [x^n]( QPochhammer(-x) - 1 )^3. - G. C. Greubel, Sep 07 2023

Extensions

Definition and offset edited by Ilya Gutkovskiy, Feb 07 2021

A341279 Triangle read by rows: T(n,k) = coefficient of x^n in expansion of (-1 + Product_{j>=1} 1 / (1 + (-x)^j))^k, n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 3, 3, 4, 0, 1, 0, 1, 4, 6, 4, 5, 0, 1, 0, 2, 5, 9, 10, 5, 6, 0, 1, 0, 2, 8, 13, 16, 15, 6, 7, 0, 1, 0, 2, 9, 21, 26, 25, 21, 7, 8, 0, 1, 0, 2, 12, 27, 44, 45, 36, 28, 8, 9, 0, 1, 0, 3, 15, 40, 63, 80, 71, 49, 36, 9, 10, 0, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 08 2021

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0,  1;
  0,  0,  1;
  0,  1,  0,  1;
  0,  1,  2,  0,  1;
  0,  1,  2,  3,  0,  1;
  0,  1,  3,  3,  4,  0,  1;
  0,  1,  4,  6,  4,  5,  0,  1;
  0,  2,  5,  9, 10,  5,  6,  0,  1;
  0,  2,  8, 13, 16, 15,  6,  7,  0,  1;
  0,  2,  9, 21, 26, 25, 21,  7,  8,  0,  1;
  0,  2, 12, 27, 44, 45, 36, 28,  8,  9,  0,  1;
  ...
		

Crossrefs

Main diagonal and lower diagonals give A000012, A000004, A001477, A000217, A000290.
Row sums give A307058.
T(2n,n) gives A341265.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, add(add([0, d, -d, d]
          [1+irem(d, 4)], d=numtheory[divisors](j))*g(n-j), j=1..n)/n)
        end:
    T:= proc(n, k) option remember;
          `if`(k=0, `if`(n=0, 1, 0), `if`(k=1, `if`(n=0, 0, g(n)),
          (q-> add(T(j, q)*T(n-j, k-q), j=0..n))(iquo(k, 2))))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Feb 09 2021
  • Mathematica
    T[n_, k_] := SeriesCoefficient[(-1 + 2/QPochhammer[-1, -x])^k, {x, 0, n}]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten

Formula

G.f. of column k: (-1 + Product_{j>=1} (1 + x^(2*j-1)))^k.
Sum_{k=0..n} (-1)^(n-k) * T(n,k) = A000009(n).

A341418 Triangle read by rows: T(n, m) gives the sum of the weights of weighted compositions of n with m parts from generalized pentagonal numbers {A001318(k)}_{k>=1}.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 0, 1, 3, 1, -1, 0, 3, 4, 1, 0, -2, 1, 6, 5, 1, -1, -2, -3, 4, 10, 6, 1, 0, -2, -6, -3, 10, 15, 7, 1, 0, -2, -6, -12, 0, 20, 21, 8, 1, 0, 1, -6, -16, -19, 9, 35, 28, 9, 1, 0, 0, 0, -16, -35, -24, 28, 56, 36, 10, 1, 1, 2, 3, -6, -40, -65, -21, 62, 84, 45, 11, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 15 2021

Keywords

Comments

The sums of row n are given in A000041(n), for n >= 1 (number of partitions).
A differently signed triangle is A047265.
One could add a column m = 0 starting at n = 0 with T(0, 0) = 1 and T(n, 0) = 0 otherwise, by including the empty partition with no parts.
For the weights w of positive integer numbers n see a comment in A339885. It is w(n) = -A010815(n), for n >= 0. Also w(n) = A257628(n), for n >= 1.
The weight of a composition is the one of the respective partition, obtained by the product of the weights of the parts.
That the row sums give the number of partitions follows from the pentagonal number theorem. See also the Apr 04 2013 conjecture in A000041 by Gary W. Adamson, and the hint for the proof by Joerg Arndt. The INVERT map of A = {1, 1, 0, 0, -5, -7, ...}, with offset 1, gives the A000041(n) numbers, for n >= 0.
If the above mentioned column for m = 0, starting at n = 0 is added this is an ordinary convolution triangle of the Riordan type R(1, f(x)), with f(x) = -(Product_{j>=1} (1 - x^j) - 1), generating {A257628(n)}{n>=0}. See the formulae below. - _Wolfdieter Lang, Feb 16 2021

Examples

			The triangle T(n, m) begins:
  n\m   1  2  3   4   5   6   7  8  9 10 11 12 ... A000041
  --------------------------------------------------------
  1:    1                                                1
  2:    1  1                                             2
  3:    0  2  1                                          3
  4:    0  1  3   1                                      5
  5:   -1  0  3   4   1                                  7
  6:    0 -2  1   6   5   1                             11
  7:   -1 -2 -3   4  10   6   1                         15
  8:    0 -2 -6  -3  10  15   7  1                      22
  9:    0 -2 -6 -12   0  20  21  8  1                   30
  10:   0  1 -6 -16 -19   9  35 28  9  1                42
  11:   0  0  0 -16 -35 -24  28 56 36 10  1             56
  12:   1  2  3  -6 -40 -65 -21 62 84 45 11  1          77
  ...
For instance the case n = 6: The relevant weighted partitions with parts from the pentagonal numbers and number of compositions are: m = 2: 2*(1,-5) = -2*(1,5), m = 3: 1*(2^3), m = 4: 3*(1^2,2^2), m = 5: 1*(1^4,2), m = 6: 1*(1^6). The other partitions have weight 0.
		

Crossrefs

Cf. A000041, A008284, A010815, A047265, A257628, -A307059 (alternating row sums), A339885 (for partitions).

Programs

  • Maple
    # Using function PMatrix from A357368. Adds a row and a column for n, m = 0.
    PMatrix(14, proc(n) 24*n+1; if issqr(%) then sqrt(%); -(-1)^irem(iquo(%+irem(%,6),6),2) else 0 fi end); # Peter Luschny, Oct 06 2022
  • Mathematica
    nmax = 12;
    col[m_] := col[m] = (-(Product[(1-x^j), {j, 1, nmax}]-1))^m // CoefficientList[#, x]&;
    T[n_, m_] := col[m][[n+1]];
    Table[T[n, m], {n, 1, nmax}, {m, 1, n}] // Flatten (* Jean-François Alcover, Oct 23 2023 *)

Formula

T(n, m) = Sum_{j=1..p(n,m)} w(Part(n, m, j))*M0(n, m, j), where p(n, m) = A008284(n, m), M0(n, m, j) are the multinomials from A048996, i.e., m!/Prod_{k=1..m} e(n,m,j,k)! with the exponents of the parts, and the ternary weight of the j-th partition of n with m parts Part(n,m,j), in Abramowitz-Stegun order, is defined as the product of the weights of the parts, using w(n) = -A010815(n), for n >= 1, and m = 1, 2, ..., n.
From Wolfdieter Lang, Feb 16 2021: (Start)
G.f. column m: G(m, x) = ( -(Product_{j>=1} (1 - x^j) - 1) )^m, for m >= 1.
G.f. of row polynomials R(n, x) = Sum_{m=1..n}, that is g. f. of the triangle:
GfT(z, x) = 1/(1 - x*G(1, z)) - 1. Riordan triangle (without m = 0 column). (End)
Showing 1-4 of 4 results.