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

A124327 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n} such that the sum of the least entries of the blocks is k (1<=k<=n*(n+1)/2).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 1, 0, 1, 1, 0, 4, 2, 1, 3, 2, 1, 0, 1, 1, 0, 8, 4, 2, 10, 6, 7, 2, 5, 3, 2, 1, 0, 1, 1, 0, 16, 8, 4, 29, 19, 21, 14, 23, 14, 18, 10, 7, 7, 5, 3, 2, 1, 0, 1, 1, 0, 32, 16, 8, 85, 56, 64, 42, 101, 62, 75, 69, 47, 54, 38, 38, 24, 23, 10, 13, 7, 5, 3, 2, 1, 0, 1, 1, 0, 64, 32, 16
Offset: 1

Views

Author

Emeric Deutsch, Oct 31 2006

Keywords

Comments

Row n has n(n+1)/2 terms. Row sums yield the Bell numbers (A000110). T(n,1)=1; T(n,2)=0; T(n,3)=2^(n-2). for n>=2; T(n,4)=2^(n-3) for n>=3; T(n,5)=2^(n-4) for n>=4.

Examples

			T(4,7) = 2 because we have 13|2|4 and 1|23|4.
Triangle starts:
  1;
  1, 0,  1;
  1, 0,  2, 1, 0,  1;
  1, 0,  4, 2, 1,  3,  2,  1,  0,  1;
  1, 0,  8, 4, 2, 10,  6,  7,  2,  5,  3,  2,  1, 0, 1;
  1, 0, 16, 8, 4, 29, 19, 21, 14, 23, 14, 18, 10, 7, 7, 5, 3, 2, 1, 0, 1;
  ...
		

Crossrefs

Antidiagonal sums give A365821.
Row maxima give A365903.
T(n,n) gives A368204.

Programs

  • Maple
    Q[1]:=t*s: for n from 2 to 8 do Q[n]:=expand(s*diff(Q[n-1],s)+t^n*s*Q[n-1]) od: for n from 1 to 8 do P[n]:=sort(subs(s=1,Q[n])) od: for n from 1 to 8 do seq(coeff(P[n],t,k),k=1..n*(n+1)/2) od; # yields sequence in triangular form
  • Mathematica
    Q[1, t_, s_] := t s;
    Q[n_, t_, s_] := Q[n, t, s] = s D[Q[n-1, t, s], s] + s t^n Q[n-1, t, s] // Expand;
    P[n_, t_] := Q[n, t, s] /. s -> 1;
    T[n_] := Rest@CoefficientList[P[n, t], t];
    Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Jun 10 2024 *)

Formula

The generating polynomial of row n is P(n,t)=Q(n,t,1), where Q(n,t,s)=s*dQ(n-1,t,s)/ds + st^n*Q(n-1,t,s); Q(1,t,s)=ts.
Sum_{k=1..n*(n+1)/2} k * T(n,k) = A124325(n+1). - Alois P. Heinz, Dec 05 2023

A367969 Number of partitions of [n] whose block maxima sum to k, where k is chosen so as to maximize this number.

Original entry on oeis.org

1, 1, 1, 2, 5, 11, 37, 129, 431, 1921, 9544, 43844, 223512, 1407320, 8519457, 52422985, 373424140, 2685768084, 20354852852, 160370778238, 1318493838635, 11239312718146, 98700416575613, 916309760098349, 8735277842452542, 84921152781222758, 860903677319960583
Offset: 0

Views

Author

Alois P. Heinz, Dec 06 2023

Keywords

Examples

			a(5) = 11 = A367955(5,12) is the largest value in row 5 of A367955 and counts the partitions of [5] having block maxima sum 12: 123|4|5, 124|3|5, 125|3|4, 13|24|5, 13|25|4, 14|23|5, 15|23|4, 14|25|3, 15|24|3, 1|2|34|5, 1|2|35|4.
		

Crossrefs

Row maxima of A367955.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, 1,
          b(n-1, m)*m + expand(x^n*b(n-1, m+1)))
        end:
    a:= n-> max(coeffs(b(n, 0))):
    seq(a(n), n=0..30);
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(i*(i+1)/2 max(seq(b(k, n, 0), k=n..n*(n+1)/2)):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, 1, b[n-1, m]*m + Expand[x^n*b[n-1, m+1]]];
    a[n_] := Max[CoefficientList[b[n, 0], x]];
    Table[a[n], {n, 0, 30}]
    (* second program: *)
    b[n_, i_, t_] := b[n, i, t] = If[i*(i + 1)/2 < n, 0, If[n == 0, t^i, If[t == 0, 0, t*b[n, i - 1, t]] + (t + 1)^Max[0, 2*i - n - 1]*b[n - i, Min[n - i, i - 1], t + 1]]];
    a[n_] := If[n == 0, 1, Max[Table[b[k, n, 0], { k, n, n*(n + 1)/2}]]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 13 2023, after Alois P. Heinz *)
Showing 1-2 of 2 results.