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.

A274537 Number T(n,k) of set partitions of [n] into k blocks such that each element is contained in a block whose index parity coincides with the parity of the element; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 3, 2, 1, 0, 0, 1, 3, 7, 2, 1, 0, 0, 1, 7, 14, 13, 3, 1, 0, 0, 1, 7, 35, 26, 22, 3, 1, 0, 0, 1, 15, 70, 113, 66, 34, 4, 1, 0, 0, 1, 15, 155, 226, 311, 102, 50, 4, 1, 0, 0, 1, 31, 310, 833, 933, 719, 200, 70, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 27 2016

Keywords

Comments

All odd elements are in blocks with an odd index and all even elements are in blocks with an even index.

Examples

			T(6,2) = 1: 135|246.
T(6,3) = 3: 13|246|5, 15|246|3, 1|246|35.
T(6,4) = 7: 13|24|5|6, 15|24|3|6, 1|24|35|6, 15|26|3|4, 15|2|3|46, 1|26|35|4, 1|2|35|46.
T(6,5) = 2: 1|26|3|4|5, 1|2|3|46|5.
T(6,6) = 1: 1|2|3|4|5|6.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 1,  1;
  0, 0, 1,  1,   1;
  0, 0, 1,  3,   2,   1;
  0, 0, 1,  3,   7,   2,   1;
  0, 0, 1,  7,  14,  13,   3,   1;
  0, 0, 1,  7,  35,  26,  22,   3,  1;
  0, 0, 1, 15,  70, 113,  66,  34,  4, 1;
  0, 0, 1, 15, 155, 226, 311, 102, 50, 4, 1;
  ...
		

Crossrefs

Row sums give A274538.
Columns k=0-10 give: A000007, A000007(n-1), A000012(n-2), A052551(n-3), A274868, A274869, A274870, A274871, A274872, A274873, A274874.
T(2n,n) gives A274875.
Main diagonal and lower diagonals give: A000012, A004526, A002623(n-2) or A173196.
Cf. A364267.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, x^m, add(
         `if`(irem(j, 2)=t, b(n-1, max(m, j), 1-t), 0), j=1..m+1))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0, 1)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, m_, t_] := b[n, m, t] = If[n==0, x^m, Sum[If[Mod[j, 2]==t, b[n-1, Max[m, j], 1-t], 0], {j, 1, m+1}]]; T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0, 1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)

Formula

Sum_{k=0..n} k * T(n,k) = A364267(n). - Alois P. Heinz, Jul 16 2023

A274835 Number A(n,k) of set partitions of [n] such that the difference between each element and its block index is a multiple of 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, 1, 5, 1, 1, 1, 1, 2, 15, 1, 1, 1, 1, 1, 3, 52, 1, 1, 1, 1, 1, 2, 7, 203, 1, 1, 1, 1, 1, 1, 3, 14, 877, 1, 1, 1, 1, 1, 1, 2, 4, 39, 4140, 1, 1, 1, 1, 1, 1, 1, 3, 9, 95, 21147, 1, 1, 1, 1, 1, 1, 1, 2, 4, 18, 304, 115975, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 08 2016

Keywords

Examples

			A(3,0) = 1: 1|2|3.
A(3,1) = 5: 123, 12|3, 13|2, 1|23, 1|2|3.
A(5,2) = 7: 135|24, 13|24|5, 15|24|3, 1|24|35, 15|2|3|4, 1|2|35|4, 1|2|3|4|5.
A(7,3) = 9: 147|25|36, 14|25|36|7, 17|25|36|4, 1|25|36|47, 17|2|36|4|5, 1|2|36|47|5, 17|2|3|4|5|6, 1|2|3|47|5|6, 1|2|3|4|5|6|7.
Square array A(n,k) begins:
  1,      1,   1,  1,  1, 1, 1, 1, 1, 1, 1, ...
  1,      1,   1,  1,  1, 1, 1, 1, 1, 1, 1, ...
  1,      2,   1,  1,  1, 1, 1, 1, 1, 1, 1, ...
  1,      5,   2,  1,  1, 1, 1, 1, 1, 1, 1, ...
  1,     15,   3,  2,  1, 1, 1, 1, 1, 1, 1, ...
  1,     52,   7,  3,  2, 1, 1, 1, 1, 1, 1, ...
  1,    203,  14,  4,  3, 2, 1, 1, 1, 1, 1, ...
  1,    877,  39,  9,  4, 3, 2, 1, 1, 1, 1, ...
  1,   4140,  95, 18,  5, 4, 3, 2, 1, 1, 1, ...
  1,  21147, 304, 33, 11, 5, 4, 3, 2, 1, 1, ...
  1, 115975, 865, 89, 22, 6, 5, 4, 3, 2, 1, ...
		

Crossrefs

Main diagonal gives A000012.
A(n,ceiling(n/2)) gives A008619.
A(3n,n) gives A094002.

Programs

  • Maple
    b:= proc(n, k, m, t) option remember; `if`(n=0, 1,
         add(`if`(irem(j-t, k)=0, b(n-1, k, max(m, j),
                  irem(t+1, k)), 0), j=1..m+1))
        end:
    A:= (n, k)-> `if`(k=0, 1, b(n, k, 0, 1)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, k_, m_, t_] := b[n, k, m, t] = If[n==0, 1, Sum[If[Mod[j-t, k]==0, b[n-1, k, Max[m, j], Mod[t+1, k]], 0], {j, 1, m+1}]]; A[n_, k_]:= If[k==0, 1, b[n, k, 0, 1]]; Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)

A363073 Number of set partitions of [n] such that each element is contained in a block whose block size parity coincides with the parity of the element.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 0, 0, 20, 48, 0, 0, 1147, 3968, 0, 0, 173203, 709488, 0, 0, 53555964, 246505600, 0, 0, 28368601065, 148963383616, 0, 0, 24044155851601, 141410718244864, 0, 0, 30934515698084780, 198914201874983936, 0, 0, 57215369885233295955, 398742900995358584320
Offset: 0

Views

Author

Alois P. Heinz, May 17 2023

Keywords

Comments

All odd elements are in blocks with an odd block size and all even elements are in blocks with an even block size.

Examples

			a(0) = 1: (), the empty partition.
a(1) = 1: 1.
a(4) = 1: 1|24|3.
a(5) = 2: 135|24, 1|24|3|5.
a(8) = 20: 135|2468|7, 135|24|68|7, 137|2468|5, 137|24|5|68, 135|26|48|7, 135|28|46|7, 137|26|48|5, 137|28|46|5, 157|2468|3, 157|24|3|68, 1|2468|357, 1|24|357|68, 1|2468|3|5|7, 1|24|3|5|68|7, 157|26|3|48, 157|28|3|46, 1|26|357|48, 1|28|357|46, 1|26|3|48|5|7, 1|28|3|46|5|7.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, add(
         `if`((j+t)::even, b(n-j, t)*binomial(n-1, j-1), 0), j=1..n))
        end:
    a:= n-> (h-> b(n-h, 1)*b(h, 0))(iquo(n, 2)):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_, t_] := b[n, t] = If[n == 0, 1, Sum[If[EvenQ[j + t], b[n - j, t]* Binomial[n - 1, j - 1], 0], {j, 1, n}]];
    a[n_] := b[n - #, 1]*b[#, 0]&[Quotient[n, 2]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 18 2023, after Alois P. Heinz *)

Formula

a(n) = A003724(ceiling(n/2)) * A005046(floor(n/4)) if (n mod 4) in {0,1}.
a(n) = 0 if (n mod 4) in {2,3}.
Showing 1-3 of 3 results.