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 12 results. Next

A287216 Number A(n,k) of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 5, 9, 1, 1, 1, 2, 5, 14, 23, 1, 1, 1, 2, 5, 15, 44, 66, 1, 1, 1, 2, 5, 15, 51, 152, 210, 1, 1, 1, 2, 5, 15, 52, 191, 571, 733, 1, 1, 1, 2, 5, 15, 52, 202, 780, 2317, 2781, 1, 1, 1, 2, 5, 15, 52, 203, 857, 3440, 10096, 11378, 1
Offset: 0

Views

Author

Alois P. Heinz, May 21 2017

Keywords

Examples

			A(4,0) = 1: 1234.
A(4,1) = 9: 1234, 134|2, 13|24, 14|23, 1|234, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
A(4,2) = 14: 1234, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 14|23, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
A(5,1) = 23: 12345, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 145|2|3, 14|25|3, 14|2|35, 15|24|3, 1|245|3, 1|24|35, 15|2|34, 1|25|34, 1|2|345, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45, 1|2|3|4|5.
Square array A(n,k) begins:
  1,   1,   1,   1,   1,   1,   1,   1, ...
  1,   1,   1,   1,   1,   1,   1,   1, ...
  1,   2,   2,   2,   2,   2,   2,   2, ...
  1,   4,   5,   5,   5,   5,   5,   5, ...
  1,   9,  14,  15,  15,  15,  15,  15, ...
  1,  23,  44,  51,  52,  52,  52,  52, ...
  1,  66, 152, 191, 202, 203, 203, 203, ...
  1, 210, 571, 780, 857, 876, 877, 877, ...
		

Crossrefs

Columns k=0-10 give: A000012, A026898(n-1) for n>0, A287252, A287253, A287254, A287255, A287256, A287257, A287258, A287259, A287260.
Main diagonal gives A000110.

Programs

  • Maple
    b:= proc(n, k, m, l) option remember; `if`(n<1, 1,
         `if`(l-n>k, 0, b(n-1, k, m+1, n))+m*b(n-1, k, m, l))
        end:
    A:= (n, k)-> b(n-1, min(k, n-1), 1, n):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, k_, m_, l_] := b[n, k, m, l] = If[n < 1, 1, If[l - n > k, 0, b[n - 1, k, m + 1, n]] + m*b[n - 1, k, m, l]];
    A[n_, k_] := b[n - 1, Min[k, n - 1], 1, n];
    Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..k} A287215(n,j).

A287641 Number A(n,k) of set partitions of [n] such that j is member of block b only if b = 1 or at least one of j-1, ..., j-k is member of a block >= b-1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 5, 1, 1, 1, 2, 5, 14, 1, 1, 1, 2, 5, 15, 42, 1, 1, 1, 2, 5, 15, 51, 132, 1, 1, 1, 2, 5, 15, 52, 191, 429, 1, 1, 1, 2, 5, 15, 52, 202, 773, 1430, 1, 1, 1, 2, 5, 15, 52, 203, 861, 3336, 4862, 1, 1, 1, 2, 5, 15, 52, 203, 876, 3970, 15207, 16796, 1
Offset: 0

Views

Author

Alois P. Heinz, May 28 2017

Keywords

Examples

			A(5,0) = 1: 12345.
A(5,1) = 42 = 52 - 10 = A000110(5) - 10 counts all set partitions of [5] except: 124|3|5, 135|2|4, 13|25|4, 13|2|45, 13|2|4|5, 14|23|5, 14|2|35, 14|2|3|5, 1|24|3|5, 134|2|5.
A(5,2) = 51 = 52 - 1 = A000110(5) - 1 counts all set partitions of [5] except: 134|2|5.
Square array A(n,k) begins:
  1,   1,   1,   1,   1,   1,   1,   1, ...
  1,   1,   1,   1,   1,   1,   1,   1, ...
  1,   2,   2,   2,   2,   2,   2,   2, ...
  1,   5,   5,   5,   5,   5,   5,   5, ...
  1,  14,  15,  15,  15,  15,  15,  15, ...
  1,  42,  51,  52,  52,  52,  52,  52, ...
  1, 132, 191, 202, 203, 203, 203, 203, ...
  1, 429, 773, 861, 876, 877, 877, 877, ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, 1, add(b(n-1,
          [seq(max(l[i], j), i=2..nops(l)), j]), j=1..l[1]+1))
        end:
    A:= (n, k)-> `if`(k=0, 1, b(n, [0$k])):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[0, ] = 1; b[n, l_List] := b[n, l] = Sum[b[n - 1, Append[ Table[ Max[ l[[i]], j], {i, 2, Length[l]}], j]], {j, 1, l[[1]] + 1}];
    A[n_, k_] := If[k == 0, 1, b[n, Table[0, k]]];
    Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..k} A287640(n,j).

A287214 Number A(n,k) of set partitions of [n] such that for each block all absolute differences between consecutive elements are <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 5, 8, 1, 1, 1, 2, 5, 13, 16, 1, 1, 1, 2, 5, 15, 34, 32, 1, 1, 1, 2, 5, 15, 47, 89, 64, 1, 1, 1, 2, 5, 15, 52, 150, 233, 128, 1, 1, 1, 2, 5, 15, 52, 188, 481, 610, 256, 1, 1, 1, 2, 5, 15, 52, 203, 696, 1545, 1597, 512, 1
Offset: 0

Views

Author

Alois P. Heinz, May 21 2017

Keywords

Comments

The sequence of column k satisfies a linear recurrence with constant coefficients of order 2^(k-1) for k>0.

Examples

			A(4,0) = 1: 1|2|3|4.
A(4,1) = 8: 1234, 123|4, 12|34, 12|3|4, 1|234, 1|23|4, 1|2|34, 1|2|3|4.
A(4,2) = 13: 1234, 123|4, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 1|234, 1|23|4, 1|24|3, 1|2|34, 1|2|3|4.
Square array A(n,k) begins:
  1,  1,   1,   1,   1,   1,   1,   1, ...
  1,  1,   1,   1,   1,   1,   1,   1, ...
  1,  2,   2,   2,   2,   2,   2,   2, ...
  1,  4,   5,   5,   5,   5,   5,   5, ...
  1,  8,  13,  15,  15,  15,  15,  15, ...
  1, 16,  34,  47,  52,  52,  52,  52, ...
  1, 32,  89, 150, 188, 203, 203, 203, ...
  1, 64, 233, 481, 696, 825, 877, 877, ...
		

Crossrefs

Main diagonal gives A000110.

Programs

  • Maple
    b:= proc(n, k, l) option remember; `if`(n=0, 1, b(n-1, k, map(x->
          `if`(x-n>=k, [][], x), [l[], n]))+add(b(n-1, k, sort(map(x->
          `if`(x-n>=k, [][], x), subsop(j=n, l)))), j=1..nops(l)))
        end:
    A:= (n, k)-> b(n, min(k, n-1), []):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[0, , ] = 1; b[n_, k_, l_List] := b[n, k, l] = b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]]], {j, 1, Length[l]}];
    A[n_, k_] := b[n, Min[k, n - 1], {}];
    Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..k} A287213(n,j).

A287416 Number T(n,k) of set partitions of [n] such that the maximal value of all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks equals k; triangle T(n,k), n>=0, 0<=k<=max(n-1,0), read by rows.

Original entry on oeis.org

1, 1, 0, 2, 0, 3, 2, 0, 4, 8, 3, 0, 5, 22, 19, 6, 0, 6, 52, 81, 48, 16, 0, 7, 114, 289, 267, 147, 53, 0, 8, 240, 941, 1250, 968, 529, 204, 0, 9, 494, 2894, 5310, 5469, 3919, 2174, 878, 0, 10, 1004, 8601, 21256, 28083, 25326, 17593, 9961, 4141
Offset: 0

Views

Author

Alois P. Heinz, May 24 2017

Keywords

Comments

The maximal value is assumed to be zero if there are no consecutive blocks and no consecutive elements.
T(n,k) is defined for all n,k >= 0. The triangle contains only the terms for k <= max(n-1,0). T(n,k) = 0 if k>=n and k>0.

Examples

			T(4,1) = 4: 1234, 1|234, 1|2|34, 1|2|3|4.
T(4,2) = 8: 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 1|23|4, 1|24|3.
T(4,3) = 3: 123|4, 14|23, 14|2|3.
T(5,3) = 19: 1235|4, 123|45, 123|4|5, 125|34, 125|3|4, 134|25, 134|2|5, 13|24|5, 13|25|4, 145|23, 14|235, 14|23|5, 1|234|5, 145|2|3, 14|25|3, 14|2|35, 14|2|3|5, 1|25|34, 1|25|3|4.
Triangle T(n,k) begins:
  1;
  1;
  0, 2;
  0, 3,   2;
  0, 4,   8,   3;
  0, 5,  22,  19,    6;
  0, 6,  52,  81,   48,  16;
  0, 7, 114, 289,  267, 147,  53;
  0, 8, 240, 941, 1250, 968, 529, 204;
  ...
		

Crossrefs

Columns k=1-2 give: A001477 (for n>1), A005803 (for n>0).
Row sums give A000110.

Programs

  • Maple
    b:= proc(n, k, l, t) option remember; `if`(n<1, 1, `if`(t-n>k, 0,
           b(n-1, k, map(x-> `if`(x-n>=k, [][], x), [l[], n]), n)) +add(
           b(n-1, k, sort(map(x-> `if`(x-n>=k, [][], x), subsop(j=n, l))),
           `if`(t-n>k, infinity, t)), j=1..nops(l)))
        end:
    A:= (n, k)-> b(n, min(k, n-1), [], n):
    T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)):
    seq(seq(T(n, k), k=0..max(n-1, 0)), n=0..12);
  • Mathematica
    b[n_, k_, l_, t_] := b[n, k, l, t] = If[n < 1, 1, If[t - n > k, 0, b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n], n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]], If[t - n > k, Infinity, t]], {j, 1, Length[l]}]];
    A[n_, k_] := b[n, Min[k, n - 1], {}, n];
    T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
    Table[T[n, k], {n, 0, 12}, { k, 0, Max[n - 1, 0]}] // Flatten (* Jean-François Alcover, May 24 2018, translated from Maple *)

Formula

T(n,k) = A287417(n,k) - A287417(n,k-1) for k>0, T(n,0) = 1.
T(n+2,n+1) = 1 + A000110(n).

A287582 Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than three.

Original entry on oeis.org

1, 1, 2, 5, 15, 46, 139, 410, 1189, 3397, 9615, 27056, 75838, 212088, 592314, 1652806, 4609789, 12853354, 35832568, 99884249, 278414160, 776016655, 2162929636, 6028494326, 16802444328, 46831107603, 130525521011, 363794294041, 1013948759937, 2826024652739
Offset: 0

Views

Author

Alois P. Heinz, May 26 2017

Keywords

Crossrefs

Column k=3 of A287417.
Cf. A000110.

Formula

G.f.: -(2*x^9+7*x^8-6*x^6-x^5+11*x^4+x^3-3*x+1) / ((x^2+x-1) * (2*x^6 +3*x^5 -6*x^3 -3*x^2 -x+1) * (x-1)^2).
a(n) = A000110(n) for n <= 4.

A287583 Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than four.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 187, 677, 2439, 8707, 30871, 108696, 380653, 1328193, 4623194, 16065161, 55763738, 193430602, 670683122, 2324853720, 8057594663, 27923827498, 96765523944, 335314355594, 1161917842116, 4026187435945, 13951144657754, 48341945365173
Offset: 0

Views

Author

Alois P. Heinz, May 26 2017

Keywords

Crossrefs

Column k=4 of A287417.
Cf. A000110.

Formula

G.f.: -(4*x^23 +8*x^22 +21*x^21 +5*x^20 -16*x^19 +24*x^18 +76*x^17 +176*x^16 +25*x^15 -80*x^14 -119*x^13 +169*x^12 +324*x^11 +259*x^10 +26*x^9 -129*x^8 -37*x^7 -24*x^6 +52*x^5 +6*x^4 +x^2 -4*x +1) / ((4*x^16 +4*x^15 -3*x^14 -4*x^13 -13*x^12 +20*x^11 +16*x^10 -13*x^9 -68*x^8 -81*x^7 -36*x^6 -4*x^5 +23*x^4 +11*x^3 +4*x^2 +x -1)*(x -1)^2*(x^3 +x^2 +x -1)^2).
a(n) = A000110(n) for n <= 5.

A287584 Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than five.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 203, 824, 3407, 14176, 58954, 244412, 1010802, 4167621, 17133558, 70278017, 287797888, 1177218237, 4811244031, 19651589669, 80234989720, 327503437323, 1336574600154, 5454075504109, 22254465906164, 90801509373219, 370472833209387
Offset: 0

Views

Author

Alois P. Heinz, May 26 2017

Keywords

Crossrefs

Column k=5 of A287417.
Cf. A000110.

Formula

G.f.: -(16*x^55 +40*x^54 +8*x^53 +74*x^52 -5*x^51 -318*x^50 -184*x^49 -329*x^48 -142*x^47 -724*x^46 -4295*x^45 +135*x^44 +10219*x^43 +11230*x^42 +17694*x^41 -9835*x^40 -58571*x^39 -44920*x^38 -18846*x^37 +77331*x^36 +137586*x^35 -2726*x^34 -66412*x^33 -120019*x^32 -106707*x^31 +110373*x^30 +61244*x^29 -89340*x^28 -166963*x^27 -241737*x^26 -18801*x^25 +183341*x^24 +76875*x^23 -44809*x^22 -194064*x^21 -276159*x^20 -117373*x^19 -3527*x^18 +50167*x^17 +68672*x^16 +6577*x^15 -20654*x^14 -18383*x^13 -13866*x^12 -2815*x^11 +2840*x^10 +1096*x^9 +484*x^8 +288*x^7 -290*x^6 -31*x^5 -4*x^4 -3*x^3 -2*x^2 +5*x -1) / ((x +1)*(x^5 -2*x^3 -2*x +1)*(16*x^40 +8*x^39 -8*x^38 -6*x^37 -25*x^36 -20*x^35 +20*x^34 -447*x^33 -222*x^32 -535*x^31 -399*x^30 +3024*x^29 +1695*x^28 +1438*x^27 +444*x^26 -7664*x^25 -2469*x^24 +1957*x^23 +290*x^22 -50*x^21 -6904*x^20 -7025*x^19 +2502*x^18 +2901*x^17 +352*x^16 -822*x^15 -8224*x^14 -7130*x^13 -2351*x^12 +680*x^11 +2679*x^10 +2620*x^9 +1264*x^8 +408*x^7 +62*x^6 -105*x^5 -48*x^4 -17*x^3 -5*x^2 -x +1)*(x -1)^2*(x^4 +x^3 +x^2 +x -1)^2).
a(n) = A000110(n) for n <= 6.

A287585 Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than six.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 203, 877, 3936, 18095, 84280, 394852, 1852811, 8691683, 40761476, 190968022, 893534860, 4175717815, 19494813589, 90945241124, 424026717957, 1976119285318, 9206350189686, 42880144574315, 199687348862859, 929807546551337, 4329119748507622
Offset: 0

Views

Author

Alois P. Heinz, May 26 2017

Keywords

Crossrefs

Column k=6 of A287417.
Cf. A000110.

Formula

a(n) = A000110(n) for n <= 7.

A287586 Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than seven.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 203, 877, 4140, 20269, 101873, 520839, 2690517, 13976694, 72797864, 379609217, 1981204605, 10341627330, 53967714273, 281504203138, 1467686630577, 7649011738137, 39850489168540, 207560600018243, 1080833575339527, 5627230565442222
Offset: 0

Views

Author

Alois P. Heinz, May 26 2017

Keywords

Crossrefs

Column k=7 of A287417.
Cf. A000110.

Formula

a(n) = A000110(n) for n <= 8.

A287587 Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than eight.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147, 111834, 607467, 3364240, 18882202, 106908086, 608561226, 3475148745, 19883233772, 113936008776, 653440621531, 3749084054994, 21512691124035, 123438301231813, 708214150892273, 4062870450258864, 23305411737849083
Offset: 0

Views

Author

Alois P. Heinz, May 26 2017

Keywords

Crossrefs

Column k=8 of A287417.
Cf. A000110.

Formula

a(n) = A000110(n) for n <= 9.
Showing 1-10 of 12 results. Next