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-10 of 20 results. Next

A270953 Number T(n,k) of set partitions of [n] having exactly k pairs (m,m+1) such that m+1 is in some block b and m is in block b+1; triangle T(n,k), n>=0, 0<=k<=n-floor((1+sqrt(max(0,8n-7)))/2), read by rows.

Original entry on oeis.org

1, 1, 2, 4, 1, 9, 6, 25, 24, 3, 84, 91, 27, 1, 323, 374, 159, 21, 1377, 1699, 857, 197, 10, 6412, 8410, 4726, 1421, 174, 4, 32312, 44794, 27385, 9573, 1783, 127, 1, 174941, 254718, 167097, 64724, 15158, 1856, 76, 1011357, 1538027, 1071422, 449567, 121464, 20074, 1650, 36
Offset: 0

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			T(3,1) = 1: 13|2.
T(4,1) = 6: 124|3, 134|2, 13|24, 13|2|4, 14|23, 1|24|3.
T(5,2) = 3: 135|24, 13|25|4, 15|24|3.
T(6,3) = 1: 136|25|4.
T(7,3) = 21: 1247|36|5, 1347|26|5, 1357|246, 135|247|6, 137|246|5, 1367|25|4, 136|257|4, 136|25|47, 136|25|4|7, 137|256|4, 13|257|46, 13|25|47|6, 137|26|45, 13|27|46|5, 147|236|5, 157|246|3, 15|247|36, 15|24|37|6, 17|246|35, 1|247|36|5, 17|26|35|4.
T(8,4) = 10: 1358|247|6, 1368|257|4, 136|258|47, 136|25|48|7, 138|257|46, 13|258|47|6, 138|27|46|5, 158|247|36, 15|248|37|6, 18|247|36|5.
T(9,5) = 4: 1369|258|47, 136|259|48|7, 139|258|47|6, 159|248|37|6.
T(10,6) = 1: 136(10)|259|48|7.
Triangle T(n,k) begins:
00 :      1;
01 :      1;
02 :      2;
03 :      4,     1;
04 :      9,     6;
05 :     25,    24,     3;
06 :     84,    91,    27,    1;
07 :    323,   374,   159,   21;
08 :   1377,  1699,   857,  197,   10;
09 :   6412,  8410,  4726, 1421,  174,   4;
10 :  32312, 44794, 27385, 9573, 1783, 127,  1;
		

Crossrefs

Row sums give A000110.
T(2n,n) gives A270965.
Last terms of rows give A270967.

Programs

  • Maple
    b:= proc(n, i, m) option remember; expand(`if`(n=0, 1, add(
           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..degree(p)))(b(n, 1, 0)):
    seq(T(n), n=0..14);
  • Mathematica
    b[n_, i_, m_] := b[n, i, m] = Expand[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, Exponent[p, x]}]][b[n, 1, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 12 2016, after Alois P. Heinz *)

Formula

T(A000217(n+1),A000217(n)) = 1 for n>=0.
T(A000217(n+1)-1,A000217(n)-1) = 1+n for n>=1.
T(A000217(n+1)-2,A000217(n)-2) = A000217(1+n) for n>=2.

A271270 Number of set partitions of [n] such that for each pair of consecutive blocks (b,b+1) at least 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, 14, 43, 145, 536, 2157, 9371, 43630, 216397, 1137703, 6313675, 36848992, 225464838, 1442216870, 9620746697, 66781675113, 481413175433, 3597627996006, 27825925290597, 222422033403527, 1834910286704787, 15603508329713182, 136616625732498989
Offset: 0

Views

Author

Alois P. Heinz, Apr 03 2016

Keywords

Examples

			A000110(4) - a(4) = 15 - 14 = 1: 13|2|4.
A000110(5) - a(5) = 52 - 43 = 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[], 1}={1}, 1, 0), add(b(n-1, j, max(m, j),
          `if`(j=m+1, [l[], `if`(j=i+1, 1, 0)],
          `if`(j=i+1, 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[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_] := b[n, 0, 0, {}]; Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Jan 30 2017, translated from Maple *)

Formula

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

A185983 Triangle read by rows: number of set partitions of n elements with k circular connectors.

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 8, 4, 2, 1, 1, 20, 15, 14, 1, 1, 6, 53, 61, 68, 11, 3, 1, 25, 159, 267, 295, 97, 32, 1, 1, 93, 556, 1184, 1339, 694, 242, 28, 3, 1, 346, 2195, 5366, 6620, 4436, 1762, 371, 48, 2, 1, 1356, 9413, 25400, 34991, 27497, 12977, 3650, 634, 53, 3
Offset: 0

Views

Author

Brian Drake, Feb 08 2011

Keywords

Comments

A pair (a,a+1) in a set partition with m blocks is a circular connector if a is in block i and a+1 is in block (i mod m)+1 for some i. In addition, (n,1) is considered a circular connector if n is in block m.

Examples

			For a(4,2) = 8, the set partitions are 1/234, 134/2, 124/3, 123/4, 12/34, 14/23, 1/24/3, and 13/2/4.
For a(5,1) = 1, the set partition is 13/25/4.
For a(6,6) = 3, the set partitions are 135/246, 14/25/36, 1/2/3/4/5/6.
Triangle begins:
  1;
  1, 0;
  1, 0,  1;
  1, 0,  3,  1;
  1, 0,  8,  4,  2;
  1, 1, 20, 15, 14,  1;
  1, 6, 53, 61, 68, 11, 3;
  ...
		

Crossrefs

Cf. A185982. Row sums are A000110.
T(n,n) = A032741(n) if n>0. - Alois P. Heinz, Oct 14 2011
T(2n,n) gives A362944.

Programs

  • Maple
    b:= proc(n, i, m, t) option remember; `if`(n=0, x^(t+
         `if`(i=m and m<>1, 1, 0)), add(expand(b(n-1, j,
          max(m, j), `if`(j=m+1, 0, t+`if`(j=1 and i=m
          and j<>m, 1, 0)))*`if`(j=i+1, x, 1)), j=1..m+1))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1, 0$2)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Mar 30 2016
  • Mathematica
    b[n_, i_, m_, t_] := b[n, i, m, t] = If[n == 0, x^(t + If[i == m && m != 1, 1, 0]), Sum[Expand[b[n - 1, j, Max[m, j], If[j == m + 1, 0, t + If[j == 1 && i == m && j != m, 1, 0]]]*If[j == i + 1, x, 1]], {j, 1, m + 1}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 1, 0, 0] ];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 19 2016, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Oct 14 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).

A271206 Number T(n,k) of set partitions of [n] having exactly k triples (t,t+1,t+2) such that t+i is in block b+i for some b; triangle T(n,k), n>=0, 0<=k<=max(0,n-2), read by rows.

Original entry on oeis.org

1, 1, 2, 4, 1, 10, 4, 1, 28, 18, 5, 1, 89, 77, 30, 6, 1, 315, 345, 164, 45, 7, 1, 1233, 1617, 919, 299, 63, 8, 1, 5285, 8003, 5262, 2011, 492, 84, 9, 1, 24583, 41871, 31180, 13611, 3857, 754, 108, 10, 1, 123062, 231474, 191889, 94020, 30128, 6755, 1095, 135, 11, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2016

Keywords

Examples

			T(3,1) = 1: 1|2|3.
T(4,1) = 4: 12|3|4, 14|2|3, 1|24|3, 1|2|34.
T(5,1) = 18: 123|4|5, 125|3|4, 12|35|4, 12|3|45, 13|24|5, 1|23|4|5, 145|2|3, 14|25|3, 14|2|35, 14|2|3|5, 15|24|3, 1|245|3, 1|24|35, 1|24|3|5, 15|2|34, 1|25|34, 1|2|345, 1|2|34|5.
T(5,2) = 5: 12|3|4|5, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45.
T(5,3) = 1: 1|2|3|4|5.
Triangle T(n,k) begins:
:  0 :     1;
:  1 :     1;
:  2 :     2;
:  3 :     4,     1;
:  4 :    10,     4,     1;
:  5 :    28,    18,     5,     1;
:  6 :    89,    77,    30,     6,    1;
:  7 :   315,   345,   164,    45,    7,   1;
:  8 :  1233,  1617,   919,   299,   63,   8,   1;
:  9 :  5285,  8003,  5262,  2011,  492,  84,   9,  1;
: 10 : 24583, 41871, 31180, 13611, 3857, 754, 108, 10, 1;
		

Crossrefs

Column k=0 gives A271207.
Row sums give A000110.
Cf. A185982.

Programs

  • Maple
    b:= proc(n, i, t, m) option remember; expand(`if`(n=0, 1, add((v->
         `if`(t and v, x, 1)*b(n-1, j, v, max(m, j)))(j=i+1), j=1..m+1)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 1, false, 0)):
    seq(T(n), n=0..14);
  • Mathematica
    b[n_, i_, t_, m_] := b[n, i, t, m] = Expand[If[n==0, 1, Sum[Function[v, If[t && v, x, 1]*b[n-1, j, v, Max[m, j]]][j==i+1], {j, 1, m+1}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 1, False, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Feb 05 2017, translated from Maple *)

A271788 Number of set partitions of [n] having exactly one pair (m,m+1) such that m is in some block b and m+1 is in block b+1.

Original entry on oeis.org

0, 1, 3, 7, 16, 39, 105, 314, 1035, 3723, 14494, 60670, 271544, 1293147, 6523495, 34724247, 194357190, 1140402612, 6995760364, 44760085240, 298054873358, 2061644525813, 14787185811993, 109804829195145, 842928183558160, 6680572760715182, 54595535222727960
Offset: 1

Views

Author

Alois P. Heinz, Apr 14 2016

Keywords

Examples

			a(2) = 1: 1|2.
a(3) = 3: 12|3, 13|2, 1|23.
a(4) = 7: 123|4, 124|3, 12|34, 134|2, 13|2|4, 14|23, 1|234.
a(5) = 16: 1234|5, 1235|4, 123|45, 1245|3, 124|3|5, 125|34, 12|345, 1345|2, 134|2|5, 135|2|4, 13|25|4, 13|2|45, 145|23, 14|23|5, 15|234, 1|2345.
		

Crossrefs

Column k=1 of A185982.

Programs

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

A271789 Number of set partitions of [n] having exactly two pairs (m,m+1) such that m is in some block b and m+1 is in block b+1.

Original entry on oeis.org

0, 1, 6, 24, 86, 307, 1143, 4513, 18956, 84546, 399218, 1989792, 10439521, 57504306, 331747730, 1999924893, 12571830681, 82245682149, 558951842996, 3939679356783, 28754596249395, 217019729585609, 1691485555633721, 13598390501982510, 112633410446366669
Offset: 2

Views

Author

Alois P. Heinz, Apr 14 2016

Keywords

Examples

			a(3) = 1: 1|2|3.
a(4) = 6: 12|3|4, 13|24, 1|23|4, 14|2|3, 1|24|3, 1|2|34.
a(5) = 24: 123|4|5, 124|35, 12|34|5, 125|3|4, 12|35|4, 12|3|45, 134|25, 135|24, 13|245, 13|2|4|5, 14|235, 1|234|5, 15|23|4, 1|235|4, 1|23|45, 145|2|3, 14|2|35, 14|2|3|5, 15|24|3, 1|245|3, 1|24|3|5, 15|2|34, 1|25|34, 1|2|345.
		

Crossrefs

Column k=2 of A185982.

A271790 Number of set partitions of [n] having exactly three pairs (m,m+1) such that m is in some block b and m+1 is in block b+1.

Original entry on oeis.org

0, 1, 10, 61, 313, 1520, 7373, 36627, 188396, 1007708, 5612677, 32551400, 196447095, 1232448403, 8028591686, 54240974862, 379574487845, 2748022434268, 20558256639096, 158746877185099, 1263892981174760, 10364745848886935, 87464284123646375, 758804198576946316
Offset: 3

Views

Author

Alois P. Heinz, Apr 14 2016

Keywords

Examples

			a(4) = 1: 1|2|3|4.
a(5) = 10: 12|3|4|5, 13|24|5, 1|23|4|5, 14|25|3, 1|24|35, 1|2|34|5, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45.
		

Crossrefs

Column k=3 of A185982.

A271791 Number of set partitions of [n] having exactly four pairs (m,m+1) such that m is in some block b and m+1 is in block b+1.

Original entry on oeis.org

0, 1, 15, 129, 891, 5611, 34213, 208230, 1285094, 8108722, 52540098, 350375379, 2407395908, 17048774736, 124435165429, 935736058614, 7246161094614, 57749473020305, 473358586652328, 3987856784525223, 34506189729577186, 306454001139880689, 2791593349164080381
Offset: 4

Views

Author

Alois P. Heinz, Apr 14 2016

Keywords

Examples

			a(5) = 1: 1|2|3|4|5.
a(6) = 15: 12|3|4|5|6, 13|24|5|6, 1|23|4|5|6, 14|25|36, 1|24|35|6, 1|2|34|5|6, 15|26|3|4, 1|25|36|4, 1|2|35|46, 1|2|3|45|6, 16|2|3|4|5, 1|26|3|4|5, 1|2|36|4|5, 1|2|3|46|5, 1|2|3|4|56.
		

Crossrefs

Column k=4 of A185982.
Showing 1-10 of 20 results. Next