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

A363451 Number of partitions of [n] such that the number of blocks containing only odd elements equals the number of blocks containing only even elements.

Original entry on oeis.org

1, 0, 2, 2, 9, 23, 99, 353, 1778, 7927, 45273, 238797, 1526331, 9215950, 65020448, 439742641, 3388075807, 25270974635, 210763775071, 1713657668021, 15359474721088, 134902169999841, 1291589459223627, 12165062702520422, 123780591852786693, 1242763745129587332
Offset: 0

Views

Author

Alois P. Heinz, Jun 02 2023

Keywords

Examples

			a(0) = 1: () the empty partition.
a(1) = 0.
a(2) = 2: 12, 1|2.
a(3) = 2: 123, 13|2.
a(4) = 9: 1234, 12|34, 12|3|4, 13|24, 14|23, 1|23|4, 14|2|3, 1|2|34, 1|2|3|4.
a(5) = 23: 12345, 123|45, 123|4|5, 125|34, 12|345, 125|3|4, 12|35|4, 134|25, 134|2|5, 135|24, 13|25|4, 13|2|45, 13|2|4|5, 145|23, 14|235, 15|23|4, 1|235|4, 145|2|3, 14|2|35, 15|2|34, 1|2|345, 15|2|3|4, 1|2|35|4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, x, y, m) option remember; `if`(n=0, `if`(x=y, 1, 0),
          `if`(x+m>0, b(n-1, y, x, m)*(x+m), 0)+b(n-1, y, x+1, m)+
          `if`(y>0, b(n-1, y-1, x, m+1)*y, 0))
        end:
    a:= n-> b(n, 0$3):
    seq(a(n), n=0..28);
  • Mathematica
    b[n_, x_, y_, m_] := b[n, x, y, m] = If[n == 0, If[x == y, 1, 0], If[x + m > 0, b[n - 1, y, x, m]*(x + m), 0] + b[n - 1, y, x + 1, m] + If[y > 0, b[n - 1, y - 1, x, m + 1]*y, 0]];
    a[n_] := b[n, 0, 0, 0];
    Table[a[n], {n, 0, 28}] (* Jean-François Alcover, Oct 20 2023, after Alois P. Heinz *)

A363472 Total number of blocks in all partitions of [n] where each block has at least one odd element and at least one even element.

Original entry on oeis.org

0, 0, 1, 1, 5, 13, 55, 193, 941, 4081, 22351, 113761, 694565, 4030153, 27107095, 175738753, 1289775821, 9209233921, 73147903471, 568928274961, 4857161139365, 40796613003433, 372190216061335, 3352314486348433, 32518958606637101, 312271731474218881
Offset: 0

Views

Author

Alois P. Heinz, Jun 05 2023

Keywords

Comments

All positive terms are odd.

Examples

			a(2) = 1: 12.
a(3) = 1: 123.
a(4) = 5 = 1 + 2 + 2: 1234, 12|34, 14|23.
a(5) = 13 = 1 + 2 + 2 + 2 + 2 + 2 + 2: 12345, 123|45, 125|34, 12|345, 134|25, 145|23, 14|235.
		

Crossrefs

Programs

  • Maple
    a:= n-> (h-> add(k*Stirling2(h, k)*Stirling2(n-h, k)*k!, k=0..h))(floor(n/2)):
    seq(a(n), n=0..30);

Formula

a(n) = Sum_{k=0..floor(n/2)} k * Stirling2(floor(n/2),k) * Stirling2(ceiling(n/2),k) * k!.
Showing 1-2 of 2 results.