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-6 of 6 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

A272064 Number of set partitions of [n] such that for each pair of consecutive blocks (b,b+1) exactly one pair of consecutive numbers (i,i+1) exists with i member of b and i+1 member of b+1.

Original entry on oeis.org

1, 1, 2, 5, 13, 35, 102, 332, 1205, 4796, 20640, 95197, 467694, 2435804, 13394117, 77490260, 470198899, 2984034004, 19757370537, 136171758636, 975002124101, 7239322944625, 55648169854405, 442195755123607, 3627392029179270, 30679238282421267, 267215329668444337
Offset: 0

Views

Author

Alois P. Heinz, Apr 19 2016

Keywords

Examples

			A000110(4) - a(4) = 15 - 13 = 2: 13|24, 13|2|4.
A000110(5) - a(5) = 52 - 35 = 17: 124|35, 124|3|5, 134|25, 134|2|5, 135|24, 13|245, 13|24|5, 135|2|4, 13|25|4, 13|2|45, 13|2|4|5, 14|235, 14|23|5, 14|25|3, 14|2|3|5, 1|24|35, 1|24|3|5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, m, l) option remember; `if`(n=0,
          `if`({l[], 1}={1}, 1, 0), add(`if`(j b(n, 0$2, []):
    seq(a(n), n=0..18);
  • Mathematica
    b[n_, i_, m_, l_] := b[n, i, m, l] = If[n==0, If[Union[Append[l, 1]] == {1}, 1, 0], Sum[If[j 1], l]]]], {j, 1, m+1}]]; a[n_] := b[n, 0, 0, {}]; Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Feb 03 2017, translated from Maple *)

Formula

a(n) = A000110(n) - A272065(n).

A271271 Number of set partitions of [n] such that at least one pair of consecutive blocks (b,b+1) exists having no pair of consecutive numbers (i,i+1) with i member of b and i+1 member of b+1.

Original entry on oeis.org

0, 0, 0, 0, 1, 9, 58, 341, 1983, 11776, 72345, 462173, 3075894, 21330762, 154050330, 1157493707, 9037925277, 73244123107, 615295131046, 5351329029624, 48126530239366, 447043890866154, 4284293705043796, 42317095568379559, 430355360965092107, 4501973706497500364
Offset: 0

Views

Author

Alois P. Heinz, Apr 03 2016

Keywords

Examples

			a(4) = 1: 13|2|4.
a(5) = 9: 124|3|5, 134|2|5, 135|2|4, 13|25|4, 13|2|45, 13|2|4|5, 14|23|5, 14|2|3|5, 1|24|3|5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, m, l) option remember; `if`(n=0,
          `if`(l=[] or {l[]}={1}, 1, 0), add(b(n-1, j, max(m, j),
          `if`(j=m+1, `if`(j=i+1, [l[],1], [l[],0]),
          `if`(j=i+1, subsop(j=1, l), l))), j=1..m+1))
        end:
    a:= n-> combinat[bell](n)-b(n, 0$2, []):
    seq(a(n), n=0..18);
  • Mathematica
    b[n_, i_, m_, l_] := b[n, i, m, l] = If[n == 0, If[Union[l, {1}] == {1}, 1, 0], Sum[b[n-1, j, Max[m, j], If[j == m+1, Join[l, If[j == i+1, {1}, {0}] ], If[j == i+1, ReplacePart[l, j -> 1], l]]], {j, 1, m+1}]]; a[n_] := BellB[n] - b[n, 0, 0, {}]; Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Feb 02 2017, translated from Maple *)

Formula

a(n) = A000110(n) - A271270(n).

A271272 Number of set partitions of [n] into m blocks such that for each pair of distinct cyclically consecutive blocks (b,c) = (b,(b mod m)+1) at least one pair of numbers (i,j) = (i,(i mod n)+1) exists with i member of b and j member of c.

Original entry on oeis.org

1, 1, 2, 5, 13, 36, 110, 374, 1404, 5750, 25419, 120325, 606210, 3234618, 18202851, 107647893, 666903189, 4316424771, 29116689197, 204259773724, 1487336089532, 11221857590608, 87591879539120, 706286859093554, 5875489876724901, 50364717424939105, 444367708336858660
Offset: 0

Views

Author

Alois P. Heinz, Apr 03 2016

Keywords

Examples

			A000110(4) - a(4) = 15 - 13 = 2: 13|2|4, 1|24|3.
A000110(5) - a(5) = 52 - 36 = 16: 124|3|5, 12|35|4, 134|2|5, 135|2|4, 13|25|4, 13|2|45, 13|2|4|5, 14|23|5, 1|235|4, 14|2|3|5, 15|24|3, 1|245|3, 1|24|3|5, 1|25|34, 1|25|3|4, 1|2|35|4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, m, l) option remember; `if`(n=0,
         `if`(l=[] or {l[]}={1} or i=m and {subsop(1=1, l)[]}=
          {1}, 1, 0), add(b(n-1, j, max(m, j), `if`(l=[], [1],
         `if`(j=m+1, subsop(1=0, `if`(j=i+1, [l[],1], [l[],0])),
         `if`(j=i+1 or j=1 and i=m, subsop(j=1, l), l)))), j=1..m+1))
        end:
    a:= n-> b(n, 0$2, []):
    seq(a(n), n=0..18);
  • Mathematica
    b[n_, i_, m_, l_] := b[n, i, m, l] = If[n==0, If[l=={} || Union[l]=={1} || i==m && Union @ ReplacePart[l, 1 -> 1] == {1}, 1, 0], Sum[b[n-1, j, Max[m, j], If[l=={}, {1}, If[j==m+1, ReplacePart[If[j==i+1, Append[l, 1], Append[l, 0]], 1 -> 0], If[j==i+1 || j==1 && i==m, ReplacePart[l, j -> 1], l]]]], {j, 1, m+1}]]; a[n_] := b[n, 0, 0, {}]; Table[a[n], {n, 0, 18} ] (* Jean-François Alcover, Feb 15 2017, translated from Maple *)

Formula

a(n) = A000110(n) - A271273(n).

A272105 Number of set partitions of [n] such that for each pair of blocks (b,c) with b

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 41, 115, 362, 1208, 4112, 14107, 49187, 178049
Offset: 0

Views

Author

Alois P. Heinz, Apr 20 2016

Keywords

Examples

			a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 8: 1234, 123|4, 124|3, 12|34, 134|2, 13|24, 14|23, 1|234.
a(5) = 17: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 14|2|35.
a(6) = 41: 123456, 12345|6, 12346|5, 1234|56, 12356|4, 1235|46, 1236|45, 123|456, 12456|3, 1245|36, 1246|35, 124|356, 1256|34, 125|346, 126|345, 12|3456, 125|3|46, 13456|2, 1345|26, 1346|25, 134|256, 1356|24, 135|246, 136|245, 13|2456, 13|25|46, 1456|23, 145|236, 146|235, 14|2356, 156|234, 15|2346, 16|2345, 1|23456, 15|23|46, 145|2|36, 146|2|35, 14|26|35, 14|2|356, 15|24|36, 15|2|346.
		

Crossrefs

A272301 Number of set partitions of [n] such that for each pair of blocks (b,c) with b

Original entry on oeis.org

1, 1, 2, 4, 9, 23, 66, 204, 664, 2273, 8283, 32463, 136434, 605848
Offset: 0

Views

Author

Alois P. Heinz, Apr 25 2016

Keywords

Examples

			a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 9: 1234, 123|4, 124|3, 12|34, 134|2, 13|24, 14|23, 1|234, 14|2|3.
a(5) = 23: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 125|3|4, 1345|2, 134|25, 135|24, 13|245, 13|25|4, 145|23, 14|235, 15|234, 1|2345, 15|23|4, 145|2|3, 14|25|3, 14|2|35, 15|2|34.
a(6) = 66: 123456, 12345|6, 12346|5, 1234|56, 12356|4, 1235|46, 1236|45, 123|456, 1236|4|5, 12456|3, 1245|36, 1246|35, 124|356, 124|36|5, 1256|34, 125|346, 126|345, 12|3456, 126|34|5, 1256|3|4, 125|36|4, 125|3|46, 126|3|45, 13456|2, 1345|26, 1346|25, 134|256, 134|26|5, 1356|24, 135|246, 136|245, 13|2456, 136|24|5, 136|25|4, 13|256|4, 13|25|46, 13|26|45, 1456|23, 145|236, 146|235, 14|2356, 14|236|5, 156|234, 15|2346, 16|2345, 1|23456, 16|234|5, 156|23|4, 15|236|4, 15|23|46, 16|23|45, 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, 15|24|36, 16|24|35, 156|2|34, 15|26|34, 15|2|346, 16|2|345.
		

Crossrefs

Showing 1-6 of 6 results.