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

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).

A322877 Number of set partitions of [n] such that the maximal absolute difference between the least elements of consecutive blocks equals four.

Original entry on oeis.org

0, 1, 11, 77, 493, 3124, 20019, 130916, 878249, 6063134, 43144661, 316670184, 2397764986, 18726889938, 150814853887, 1251834352246, 10703915163764, 94227518620167, 853463133257984, 7948557602950239, 76069254546156710, 747596311576859585, 7540213445348427312
Offset: 4

Views

Author

Alois P. Heinz, Dec 29 2018

Keywords

Crossrefs

Column k=4 of A287215.

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):
    a:= n-> (k-> A(n, k)-A(n, k-1))(4):
    seq(a(n), n=4..30);
  • 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];
    a[n_] := With[{k = 4}, A[n, k] - A[n, k - 1]];
    a /@ Range[4, 30] (* Jean-François Alcover, May 05 2020, after Maple *)

Formula

a(n) = A287254(n) - A287253(n).

A322878 Number of set partitions of [n] such that the maximal absolute difference between the least elements of consecutive blocks equals five.

Original entry on oeis.org

0, 1, 19, 171, 1293, 9320, 66992, 488526, 3637440, 27735903, 216992278, 1743777862, 14401360577, 122242150172, 1066284279026, 9554869690126, 87923414758506, 830459368379431, 8047463255217118, 79967170844047637, 814439368083686232, 8497321384591725159
Offset: 5

Views

Author

Alois P. Heinz, Dec 29 2018

Keywords

Crossrefs

Column k=5 of A287215.

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):
    a:= n-> (k-> A(n, k)-A(n, k-1))(5):
    seq(a(n), n=5..30);
  • 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];
    a[n_] := With[{k = 5}, A[n, k] - A[n, k - 1]];
    a /@ Range[5, 30] (* Jean-François Alcover, May 05 2020, after Maple *)

Formula

a(n) = A287255(n) - A287254(n).
Showing 1-3 of 3 results.