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

A367955 Number T(n,k) of partitions of [n] whose block maxima sum to k, triangle T(n,k), n>=0, n<=k<=n*(n+1)/2, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 5, 2, 3, 1, 1, 1, 2, 5, 10, 7, 7, 11, 3, 4, 1, 1, 1, 2, 5, 10, 23, 15, 23, 25, 37, 18, 14, 19, 4, 5, 1, 1, 1, 2, 5, 10, 23, 47, 39, 49, 81, 84, 129, 74, 78, 70, 87, 33, 23, 29, 5, 6, 1, 1, 1, 2, 5, 10, 23, 47, 103, 81, 129, 172, 261, 304, 431, 299, 325, 376, 317, 424, 196, 183, 144, 165, 52, 34, 41, 6, 7, 1
Offset: 0

Views

Author

Alois P. Heinz, Dec 05 2023

Keywords

Comments

Rows and also columns reversed converge to A365441.
T(n,k) is defined for all n,k >= 0. The triangle contains only the positive terms. T(n,k) = 0 if k < n or k > n*(n+1)/2.

Examples

			T(4,7) = 5: 123|4, 124|3, 13|24, 14|23, 1|2|34.
T(5,9) = 10: 1234|5, 1235|4, 124|35, 125|34, 134|25, 135|24, 14|235, 15|234, 1|23|45, 1|245|3.
T(5,13) = 3: 1|23|4|5, 1|24|3|5, 1|25|3|4.
T(5,14) = 4: 12|3|4|5, 13|2|4|5, 14|2|3|5, 15|2|3|4.
T(5,15) = 1: 1|2|3|4|5.
Triangle T(n,k) begins:
  1;
  .  1;
  .  .  1, 1;
  .  .  .  1, 1, 2, 1;
  .  .  .  .  1, 1, 2, 5, 2,  3,  1;
  .  .  .  .  .  1, 1, 2, 5, 10,  7,  7, 11,  3,  4,  1;
  .  .  .  .  .  .  1, 1, 2,  5, 10, 23, 15, 23, 25, 37, 18, 14, 19, 4, 5, 1;
  ...
		

Crossrefs

Row sums give A000110.
Column sums give A204856.
Antidiagonal sums give A368102.
T(2n,3n) gives A365441.
T(n,2n) gives A368675.
Row maxima give A367969.
Row n has A000124(n-1) terms (for n>=1).
Cf. A000217, A124327 (the same for block minima), A200660, A278677.

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:
    T:= (n, k)-> coeff(b(n, 0), x, k):
    seq(seq(T(n, k), k=n..n*(n+1)/2), n=0..10);
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(i*(i+1)/2 b(k, n, 0):
    seq(seq(T(n, k), k=n..n*(n+1)/2), n=0..10);
  • Mathematica
    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]]];
    T[0, 0] = 1; T[n_, k_] := b[k, n, 0];
    Table[Table[T[n, k], {k, n, n*(n + 1)/2}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Oct 03 2024, after Alois P. Heinz's second Maple program *)

Formula

Sum_{k=n..n*(n+1)/2} k * T(n,k) = A278677(n-1) for n>=1.
Sum_{k=n..n*(n+1)/2} (k-n) * T(n,k) = A200660(n) for n>=1.
T(n,n) = T(n,n*(n+1)/2) = 1.

A124325 Number of blocks of size >1 in all partitions of an n-set.

Original entry on oeis.org

0, 0, 1, 4, 17, 76, 362, 1842, 9991, 57568, 351125, 2259302, 15288000, 108478124, 805037105, 6233693772, 50257390937, 421049519856, 3659097742426, 32931956713294, 306490813820239, 2945638599347760, 29198154161188501
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Sum of the first entries in all blocks of all set partitions of [n-1]. a(4) = 17 because the sum of the first entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 1+4+3+3+6 = 17. - Alois P. Heinz, Apr 24 2017

Examples

			a(3) = 4 because in the partitions 123, 12|3, 13|2, 1|23, 1|2|3 we have four blocks of size >1.
		

Crossrefs

Column k=2 of A283424.

Programs

  • Maple
    with(combinat): c:=n->bell(n+1)-bell(n)-n*bell(n-1): seq(c(n),n=0..23);
  • Mathematica
    nn=22;Range[0,nn]!CoefficientList[Series[(Exp[x]-1-x)Exp[Exp[x]-1],{x,0,nn}],x]  (* Geoffrey Critzer, Mar 28 2013 *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    egf = (exp(x)-1-x)*exp(exp(x)-1) + 'c0;
    gf = serlaplace(egf);
    v = Vec(gf);  v[1]-='c0;  v
    /* Joerg Arndt, Mar 29 2013 */

Formula

a(n) = B(n+1)-B(n)-n*B(n-1), where B(q) are the Bell numbers (A000110).
E.g.f.: (exp(z)-1-z)*exp(exp(z)-1).
a(n) = Sum_{k=0..floor(n/2)} k*A124324(n,k).
a(n) = A285595(n-1,1). - Alois P. Heinz, Apr 24 2017
a(n) = Sum_{k=1..n*(n-1)/2} k * A124327(n-1,k) for n>1. - Alois P. Heinz, Dec 05 2023

A368204 Number of partitions of [n] whose block minima sum to n.

Original entry on oeis.org

1, 1, 0, 2, 2, 2, 29, 56, 191, 380, 5097, 14288, 74359, 283884, 1106529, 13588409, 53640963, 350573155, 1867738775, 10770352150, 50050737949, 744605446778, 3615378756421, 29368052533243, 195027586980839, 1442227919200245, 8964685271444243, 61478734886319324
Offset: 0

Views

Author

Alois P. Heinz, Dec 16 2023

Keywords

Examples

			a(0) = 1: the empty partition.
a(1) = 1: 1.
a(2) = 0.
a(3) = 2: 13|2, 1|23.
a(4) = 2: 124|3, 12|34.
a(5) = 2: 1235|4, 123|45.
a(6) = 29: 12346|5, 1234|56, 1456|2|3, 145|26|3, 145|2|36, 146|25|3, 14|256|3, 14|25|36, 146|2|35, 14|26|35, 14|2|356, 156|24|3, 15|246|3, 15|24|36, 16|245|3, 1|2456|3, 1|245|36, 16|24|35, 1|246|35, 1|24|356, 156|2|34, 15|26|34, 15|2|346, 16|25|34, 1|256|34, 1|25|346, 16|2|345, 1|26|345, 1|2|3456.
		

Crossrefs

Main diagonal of A124327.

Programs

  • Maple
    b:= proc(n, i, t, m) option remember; `if`(n=0, t^(m-i+1),
         `if`((i+m)*(m+1-i)/2n, 0, `if`(t=0, 0,
          t*b(n, i+1, t, m))+ b(n-i, i+1, t+1, m)))
        end:
    a:= n-> b(n, 1, 0, n):
    seq(a(n), n=0..42);
  • Mathematica
    b[n_, i_, t_, m_] := b[n, i, t, m] = If[n == 0, t^(m - i + 1),
       If[(i + m)*(m + 1 - i)/2 < n || i > n, 0, If[t == 0, 0,
       t*b[n, i + 1, t, m]] + b[n - i, i + 1, t + 1, m]]];
    a[n_] := If[n == 0, 1, b[n, 1, 0, n]];
    Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Jun 10 2024, after Alois P. Heinz *)

Formula

a(n) = A124327(n,n).

A369596 Number T(n,k) of permutations of [n] whose fixed points sum to k; triangle T(n,k), n>=0, 0<=k<=A000217(n), read by rows.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 1, 2, 1, 1, 1, 0, 0, 1, 9, 2, 2, 3, 3, 2, 1, 1, 0, 0, 1, 44, 9, 9, 11, 11, 13, 5, 5, 4, 4, 2, 1, 1, 0, 0, 1, 265, 44, 44, 53, 53, 62, 64, 29, 22, 24, 16, 16, 8, 6, 5, 4, 2, 1, 1, 0, 0, 1, 1854, 265, 265, 309, 309, 353, 362, 406, 150, 159, 126, 126, 93, 86, 44, 36, 29, 19, 19, 9, 7, 5, 4, 2, 1, 1, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2024

Keywords

Examples

			T(3,0) = 2: 231, 312.
T(3,1) = 1: 132.
T(3,2) = 1: 321.
T(3,3) = 1: 213.
T(3,6) = 1: 123.
T(4,0) = 9: 2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321.
Triangle T(n,k) begins:
   1;
   0, 1;
   1, 0, 0,  1;
   2, 1, 1,  1,  0,  0, 1;
   9, 2, 2,  3,  3,  2, 1, 1, 0, 0, 1;
  44, 9, 9, 11, 11, 13, 5, 5, 4, 4, 2, 1, 1, 0, 0, 1;
  ...
		

Crossrefs

Column k=0 gives A000166.
Column k=3 gives A000255(n-2) for n>=2.
Row sums give A000142.
Row lengths give A000124.
Reversed rows converge to A331518.
T(n,n) gives A369796.

Programs

  • Maple
    b:= proc(s) option remember; (n-> `if`(n=0, 1, add(expand(
          `if`(j=n, x^j, 1)*b(s minus {j})), j=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b({$1..n})):
    seq(T(n), n=0..7);
    # second Maple program:
    g:= proc(n) option remember; `if`(n=0, 1, n*g(n-1)+(-1)^n) end:
    b:= proc(n, i, m) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, g(m), b(n, i-1, m)+b(n-i, min(n-i, i-1), m-1)))
        end:
    T:= (n, k)-> b(k, min(n, k), n):
    seq(seq(T(n, k), k=0..n*(n+1)/2), n=0..7);
  • Mathematica
    g[n_] := g[n] = If[n == 0, 1, n*g[n - 1] + (-1)^n];
    b[n_, i_, m_] := b[n, i, m] = If[n > i*(i + 1)/2, 0,
       If[n == 0, g[m], b[n, i-1, m] + b[n-i, Min[n-i, i-1], m-1]]];
    T[n_, k_] := b[k, Min[n, k], n];
    Table[Table[T[n, k], {k, 0, n*(n + 1)/2}], {n, 0, 7}] // Flatten (* Jean-François Alcover, May 24 2024, after Alois P. Heinz *)

Formula

Sum_{k=0..A000217(n)} k * T(n,k) = A001710(n+1) for n >= 1.
Sum_{k=0..A000217(n)} (1+k) * T(n,k) = A038720(n) for n >= 1.
Sum_{k=0..A000217(n)} (n*(n+1)/2-k) * T(n,k) = A317527(n+1).
T(n,A161680(n)) = A331518(n).
T(n,A000217(n)) = 1.

A365821 Total number of partitions of [n-s] whose block minima sum to s, summed over all s.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 6, 11, 23, 46, 97, 205, 448, 1004, 2339, 5661, 14291, 37507, 101962, 285386, 817772, 2386946, 7069893, 21195092, 64225525, 196636559, 608551084, 1905848637, 6049696252, 19501015441, 63960251538, 213822965681, 729536174204, 2541833303563
Offset: 0

Views

Author

Alois P. Heinz, Dec 14 2023

Keywords

Crossrefs

Antidiagonal sums of A124327.
Cf. A368102.

Programs

  • Maple
    b:= proc(n, i, t, m) option remember; `if`(n=0, t^(m-i+1),
         `if`((i+m)*(m+1-i)/2n, 0, `if`(t=0, 0,
          t*b(n, i+1, t, m))+ b(n-i, i+1, t+1, m)))
        end:
    a:= n-> add(b(k, 1, 0, n-k), k=0..n):
    seq(a(n), n=0..42);

Formula

a(7) = 6: 12|3, 134|2, 13|24, 14|23, 1|234, 123456.
a(8) = 11: 124|3, 12|34, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 1234567.

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

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 29, 101, 367, 1562, 6891, 37871, 197930, 1121634, 6888085, 46190282, 323250987, 2349020516, 17897285514, 142512956148, 1178963284732, 10248806222398, 91421283039658, 847666112839362, 8100455404172267, 79925567946537362, 814508927747776069
Offset: 0

Views

Author

Alois P. Heinz, Dec 14 2023

Keywords

Crossrefs

Row maxima of A124327.
Cf. A367969.

Programs

  • Maple
    b:= proc(n, i, t, m) option remember; `if`(n=0, t^(m-i+1),
         `if`((i+m)*(m+1-i)/2n, 0, `if`(t=0, 0,
          t*b(n, i+1, t, m))+ b(n-i, i+1, t+1, m)))
        end:
    a:= n-> max(seq(b(k, 1, 0, n), k=0..n*(n+1)/2)):
    seq(a(n), n=0..26);
    # second Maple program:
    a:= proc(h) option remember; local b; b:=
          proc(n, m) option remember; `if`(n=0, 1,
            b(n-1, m)*m + expand(x^(h-n+1)*b(n-1, m+1)))
          end: forget(b); max(coeffs(b(h, 0)))
        end:
    seq(a(n), n=0..26);
  • 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_] := Module[{s}, Q[n, t, s] /. s -> 1];
    a[n_] := If[n == 0, 1, Module[{t}, CoefficientList[P[n, t], t] // Max]];
    Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Oct 03 2024 *)

A368401 Number T(n,k) of permutations of [n] whose sum of cycle maxima minus cycle minima gives k, triangle T(n,k), n>=0, 0<=k<=A002620(n), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 1, 3, 7, 11, 2, 1, 4, 12, 28, 53, 12, 10, 1, 5, 18, 52, 135, 289, 84, 72, 58, 6, 1, 6, 25, 84, 257, 734, 1825, 524, 564, 496, 422, 60, 42, 1, 7, 33, 125, 429, 1407, 4545, 12983, 3520, 3976, 4292, 3950, 3422, 790, 486, 330, 24
Offset: 0

Views

Author

Alois P. Heinz, Dec 22 2023

Keywords

Examples

			T(3,0) = 1: (1)(2)(3).
T(3,1) = 2: (12)(3), (1)(23).
T(3,2) = 3: (123), (132), (13)(2).
Triangle T(n,k) begins:
  1;
  1;
  1, 1;
  1, 2,  3;
  1, 3,  7, 11,   2;
  1, 4, 12, 28,  53,  12,   10;
  1, 5, 18, 52, 135, 289,   84,  72,  58,   6;
  1, 6, 25, 84, 257, 734, 1825, 524, 564, 496, 422, 60, 42;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1, (k-> `if`(n>k,
          b(n-1, s)+add(b(n-1, subs(h=h+[0, 1], s)), h=s), 0)+
          `if`(n>k+1, b(n-1, {s[], [n,1]}), 0)+add(h[2]!*expand(
          x^(h[1]-n)*b(n-1, s minus {h})), h=s))(nops(s)))
        end:
    T:= (n, k)-> coeff(b(n, {}), x, k):
    seq(seq(T(n, k), k=0..floor(n^2/4)), n=0..10);

Formula

Sum_{k=0..A002620(n)} k * T(n,k) = A002538(n-1) for n >= 1.
Showing 1-7 of 7 results.