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.

A185982 Triangle read by rows: number of set partitions of n elements with k connectors, 0<=k

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 6, 1, 1, 16, 24, 10, 1, 1, 39, 86, 61, 15, 1, 1, 105, 307, 313, 129, 21, 1, 1, 314, 1143, 1520, 891, 242, 28, 1, 1, 1035, 4513, 7373, 5611, 2161, 416, 36, 1, 1, 3723, 18956, 36627, 34213, 17081, 4658, 670, 45, 1, 1, 14494, 84546, 188396, 208230, 127540, 45095, 9187, 1025, 55, 1
Offset: 1

Views

Author

Brian Drake, Feb 08 2011

Keywords

Examples

			A connector is a pair (a, a+1) in a set partition if a is in block i and a+1 is in block i+1, for some i.  For example a(4,1) = 7, counting 1/234, 13/2/4, 14/23, 134/2, 12/34, 124/3, 123/4.
Triangle begins:
  1;
  1,   1;
  1,   3,   1;
  1,   7,   6,   1;
  1,  16,  24,  10,   1;
  1,  39,  86,  61,  15,  1;
  1, 105, 307, 313, 129, 21, 1;
  ...
		

Crossrefs

Row sums give A000110.
T(n+1,n-1) gives A000217.
T(2n,n) gives A271841.

Programs

  • Maple
    b:= proc(n, i, m) option remember; `if`(n=0, 1, add(expand(
           b(n-1, j, max(m, j))*`if`(j=i+1, x, 1)), j=1..m+1))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b(n, 1, 0)):
    seq(T(n), n=1..12);  # Alois P. Heinz, Mar 25 2016
  • Mathematica
    b[n_, i_, m_] := b[n, i, m] = If[n == 0, 1, Sum[b[n-1, j, Max[m, j]]*If[j == i+1, x, 1], {j, 1, m+1}]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n-1}]][b[n, 1, 0]]; Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Apr 13 2016, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Oct 11 2011

A271207 Number of set partitions of [n] avoiding triples (t,t+1,t+2) having t+i in block b+i for some b.

Original entry on oeis.org

1, 1, 2, 4, 10, 28, 89, 315, 1233, 5285, 24583, 123062, 658335, 3741625, 22483415, 142264589, 944652336, 6562959239, 47583055191, 359196368057, 2817394708454, 22919157785777, 193045807856919, 1681025045594032, 15112573721911697, 140088106892677440
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2016

Keywords

Examples

			a(4) = 10: 1234, 123|4, 124|3, 12|34, 134|2, 13|24, 13|2|4, 14|23, 1|234, 1|23|4.
		

Crossrefs

Column k=0 of A271206.

Programs

  • Maple
    b:= proc(n, i, t, m) option remember; `if`(n=0, 1, add(`if`(
         t and j=i+1, 0, b(n-1, j, is(j=i+1), max(m, j))), j=1..m+1))
        end:
    a:= n-> b(n, 1, false, 0):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_, t_, m_] := b[n, i, t, m] = If[n == 0, 1, Sum[If[t && j == i + 1, 0, b[n - 1, j, j == i + 1, Max[m, j]]], {j, 1, m + 1}]];
    a[n_] := b[n, 1, False, 0];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 27 2018, translated from Maple *)
Showing 1-2 of 2 results.