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.

A072574 Triangle T(n,k) of number of compositions (ordered partitions) of n into exactly k distinct parts, 1<=k<=n.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 2, 0, 0, 1, 4, 0, 0, 0, 1, 4, 6, 0, 0, 0, 1, 6, 6, 0, 0, 0, 0, 1, 6, 12, 0, 0, 0, 0, 0, 1, 8, 18, 0, 0, 0, 0, 0, 0, 1, 8, 24, 24, 0, 0, 0, 0, 0, 0, 1, 10, 30, 24, 0, 0, 0, 0, 0, 0, 0, 1, 10, 42, 48, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 48, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 60, 120, 0
Offset: 1

Views

Author

Henry Bottomley, Jun 21 2002

Keywords

Comments

If terms in the compositions did not need to be distinct then the triangle would have values C(n-1,k-1), essentially A007318 offset.

Examples

			T(6,2)=4 since 6 can be written as 1+5=2+4=4+2=5+1.
Triangle starts (trailing zeros omitted for n>=10):
[ 1]  1;
[ 2]  1, 0;
[ 3]  1, 2, 0;
[ 4]  1, 2, 0, 0;
[ 5]  1, 4, 0, 0, 0;
[ 6]  1, 4, 6, 0, 0, 0;
[ 7]  1, 6, 6, 0, 0, 0, 0;
[ 8]  1, 6, 12, 0, 0, 0, 0, 0;
[ 9]  1, 8, 18, 0, 0, 0, 0, 0, 0;
[10]  1, 8, 24, 24, 0, 0, ...;
[11]  1, 10, 30, 24, 0, 0, ...;
[12]  1, 10, 42, 48, 0, 0, ...;
[13]  1, 12, 48, 72, 0, 0, ...;
[14]  1, 12, 60, 120, 0, 0, ...;
[15]  1, 14, 72, 144, 120, 0, 0, ...;
[16]  1, 14, 84, 216, 120, 0, 0, ...;
[17]  1, 16, 96, 264, 240, 0, 0, ...;
[18]  1, 16, 114, 360, 360, 0, 0, ...;
[19]  1, 18, 126, 432, 600, 0, 0, ...;
[20]  1, 18, 144, 552, 840, 0, 0, ...;
These rows (without the zeros) are shown in the Richmond/Knopfmacher reference.
From _Gus Wiseman_, Oct 17 2022: (Start)
Column n = 8 counts the following compositions.
  (8)  (1,7)  (1,2,5)
       (2,6)  (1,3,4)
       (3,5)  (1,4,3)
       (5,3)  (1,5,2)
       (6,2)  (2,1,5)
       (7,1)  (2,5,1)
              (3,1,4)
              (3,4,1)
              (4,1,3)
              (4,3,1)
              (5,1,2)
              (5,2,1)
(End)
		

Crossrefs

Columns (offset) include A057427 and A052928.
Row sums are A032020.
A008289 is the version for partitions (zeros removed).
A072575 counts strict compositions by maximum.
A097805 is the non-strict version, or A007318 (zeros removed).
A113704 is the constant instead of strict version.
A216652 is a condensed version (zeros removed).
A336131 counts splittings of partitions with distinct sums.
A336139 counts strict compositions of each part of a strict composition.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],Length[#]==k&]],{n,0,15},{k,1,n}] (* Gus Wiseman, Oct 17 2022 *)
  • PARI
    N=21;  q='q+O('q^N);
    gf=sum(n=0,N, n! * z^n * q^((n^2+n)/2) / prod(k=1,n, 1-q^k ) );
    /* print triangle: */
    gf -= 1; /* remove row zero */
    P=Pol(gf,'q);
    { for (n=1,N-1,
        p = Pol(polcoeff(P, n),'z);
        p += 'z^(n+1);  /* preserve trailing zeros */
        v = Vec(polrecip(p));
        v = vector(n,k,v[k]); /* trim to size n */
        print(v);
    ); }
    /* Joerg Arndt, Oct 20 2012 */

Formula

T(n, k) = T(n-k, k)+k*T(n-k, k-1) [with T(n, 0)=1 if n=0 and 0 otherwise] = A000142(k)*A060016(n, k).
G.f.: sum(n>=0, n! * z^n * q^((n^2+n)/2) / prod(k=1..n, 1-q^k ) ), rows by powers of q, columns by powers of z; includes row 0 (drop term for n=0 for this triangle, see PARI code); setting z=1 gives g.f. for A032020. [Joerg Arndt, Oct 20 2012]

A072575 Triangle T(n,k) of number of compositions (ordered partitions) of n into distinct parts where largest part is exactly k, 1<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 2, 1, 0, 0, 6, 2, 2, 1, 0, 0, 0, 8, 2, 2, 1, 0, 0, 0, 6, 8, 2, 2, 1, 0, 0, 0, 6, 8, 8, 2, 2, 1, 0, 0, 0, 24, 12, 8, 8, 2, 2, 1, 0, 0, 0, 0, 30, 14, 8, 8, 2, 2, 1, 0, 0, 0, 0, 30, 36, 14, 8, 8, 2, 2, 1, 0, 0, 0, 0, 24, 36, 38, 14, 8, 8, 2, 2, 1, 0, 0, 0, 0, 24, 54, 42, 38, 14, 8, 8, 2, 2, 1
Offset: 1

Views

Author

Henry Bottomley, Jun 21 2002

Keywords

Examples

			Rows start:
  1;
  0, 1;
  0, 2, 1;
  0, 0, 2, 1;
  0, 0, 2, 2, 1;
  0, 0, 6, 2, 2, 1;
  0, 0, 0, 8, 2, 2, 1;
  0, 0, 0, 6, 8, 2, 2, 1;
  ...
T(7,4)=8 since 7 can be written as 4+3 =4+2+1 =4+1+2 =3+4 =2+4+1 =2+1+4 =1+4+2 =1+2+4.
		

Crossrefs

Cf. A026836, A072574. Row sums are A032020. Column sums appear to be A001339 (offset). Starting terms of columns tend towards A072576 as k increases.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i<1, [][], zip((x, y)->x+y, [b(n, i-1)],
          `if`(i>n, [], [0, b(n-i, i-1)]), 0)[]))
        end:
    T:= proc(n, k) local l; l:= [b(n-k, k-1)];
           add(l[i]*(i)!, i=1..nops(l))
        end:
    seq(seq(T(n, k), k=1..n), n=1..20);  # Alois P. Heinz, Nov 20 2012
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i<1, {}, Plus @@ PadRight[{b[n, i-1], If[i>n, {}, Join[{0}, b[n-i, i-1]]]}]]]; T[n_, k_] := Module[{l}, l = b[n-k, k-1]; Sum[l[[i]]*i!, {i, 1, Length[l]}]]; Table[Table [T[n, k], {k, 1, n}], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 31 2014, after Alois P. Heinz *)

A218074 Expansion of Sum_{n>=1} ((n-1) * q^(n*(n+1)/2) / Product_{k=1..n} (1 - q^k)).

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 5, 7, 10, 15, 18, 25, 31, 41, 53, 66, 81, 103, 125, 154, 190, 229, 276, 333, 399, 475, 568, 673, 794, 938, 1102, 1289, 1512, 1760, 2050, 2384, 2760, 3190, 3687, 4246, 4882, 5609, 6427, 7354, 8412, 9592, 10927, 12439, 14130, 16033, 18177, 20573, 23256, 26271
Offset: 0

Views

Author

Joerg Arndt, Oct 20 2012

Keywords

Comments

Number of up-steps (== number of parts - 1) in all partitions of n into distinct parts (represented as increasing lists), see example. - Joerg Arndt, Sep 03 2014

Examples

			a(8) = 7 because in the 6 partitions of 8 into distinct parts
  1:  [ 1 2 5 ]
  2:  [ 1 3 4 ]
  3:  [ 1 7 ]
  4:  [ 2 6 ]
  5:  [ 3 5 ]
  6:  [ 8 ]
there are 2+2+1+1+1+0 = 7 up-steps. - _Joerg Arndt_, Sep 03 2014
		

Crossrefs

Cf. A015723, Sum_{n>=0} (n * q^(n*(n+1)/2) / Product_{k=1..n} (1 - q^k)).
Cf. A032020, Sum_{n>=0} (n! * q^(n*(n+1)/2) / Product_{k=1..n} (1 - q^k)).
Cf. A032153, Sum_{n>=1} ((n-1)! * q^(n*(n+1)/2) / Product_{k=1..n} (1 - q^k)).
Cf. A072576, Sum_{n>=0} ((n+1)! * q^(n*(n+1)/2) / Product_{k=1..n} (1 - q^k)).
Cf. A058884 (up-steps in all partitions).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,
          b(n, i-1)+`if`(i>n, 0, (p->p+[0, p[1]])(b(n-i, i-1)))))
        end:
    a:= n-> `if`(n=0, 0, (p-> p[2]-p[1])(b(n$2))):
    seq(a(n), n=0..80);  # Alois P. Heinz, Sep 03 2014
  • Mathematica
    max=80; s=Sum[(n-1)*q^(n*(n+1)/2)/QPochhammer[q, q, n], {n, Sqrt[max+1]}]+ O[q]^max; CoefficientList[s, q] (* Jean-François Alcover, Jan 17 2016 *)
  • PARI
    N=66;  q='q+O('q^N);
    gf=sum(n=1,N, (n-1)*q^(n*(n+1)/2) / prod(k=1,n, 1-q^k ) );
    v=Vec(gf+'a0);  v[1]-='a0;  v  /* include initial zeros */

Formula

a(n) = A015723(n) - A000009(n) for n>0. - Alois P. Heinz, Sep 03 2014

A291968 Triangle read by rows: T(n,k) = (k+1) * T(n-k,k-1) + T(n-k,k) with T(0,0) = 1 for 0 <= k <= A003056(n).

Original entry on oeis.org

1, 0, 2, 0, 2, 0, 2, 6, 0, 2, 6, 0, 2, 12, 0, 2, 12, 24, 0, 2, 18, 24, 0, 2, 18, 48, 0, 2, 24, 72, 0, 2, 24, 96, 120, 0, 2, 30, 120, 120, 0, 2, 30, 168, 240, 0, 2, 36, 192, 360, 0, 2, 36, 240, 600, 0, 2, 42, 288, 720, 720, 0, 2, 42, 336, 1080, 720, 0, 2, 48, 384
Offset: 0

Views

Author

Seiichi Manyama, Sep 07 2017

Keywords

Examples

			First few rows are:
  1;
  0, 2;
  0, 2;
  0, 2,  6;
  0, 2,  6;
  0, 2, 12;
  0, 2, 12, 24;
  0, 2, 18, 24;
  0, 2, 18, 48;
  0, 2, 24, 72;
  0, 2, 24, 96, 120.
		

Crossrefs

Row sums give A072576.
Columns 0-1 give A000007, A007395.
Cf. A216652.

Formula

G.f. of column k: (k+1)! * x^(k*(k+1)/2) / Product_{j=1..k} (1-x^j).
Showing 1-4 of 4 results.