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.

A363587 Number of partitions of [n] such that in the set of smallest block elements there is an equal number of odd and even terms.

This page as a plain text file.
%I A363587 #16 Nov 18 2023 04:02:31
%S A363587 1,0,1,2,6,16,63,246,1201,5632,30776,166800,1032537,6404960,44200745,
%T A363587 305485130,2305218366,17475547664,143075155975,1179769331662,
%U A363587 10409877747841,92570178170528,873953428860952,8318955989166944,83562716138732321,846729015766650672
%N A363587 Number of partitions of [n] such that in the set of smallest block elements there is an equal number of odd and even terms.
%H A363587 Alois P. Heinz, <a href="/A363587/b363587.txt">Table of n, a(n) for n = 0..576</a>
%H A363587 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%e A363587 a(0) = 1: () the empty partition.
%e A363587 a(1) = 0.
%e A363587 a(2) = 1: 1|2.
%e A363587 a(3) = 2: 13|2, 1|23.
%e A363587 a(4) = 6: 123|4, 134|2, 13|24, 14|23, 1|234, 1|2|3|4.
%e A363587 a(5) = 16: 1235|4, 123|45, 1345|2, 134|25, 135|24, 13|245, 13|2|4|5, 145|23, 14|235, 15|234, 1|2345, 1|23|4|5, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45.
%p A363587 b:= proc(n, x, y) option remember; `if`(abs(x-y)>2*n, 0,
%p A363587      `if`(n=0, 1, `if`(y=0, 0, b(n-1, y-1, x+1)*y)+
%p A363587         b(n-1, y, x)*x + b(n-1, y, x+1)))
%p A363587     end:
%p A363587 a:= n-> b(n, 0$2):
%p A363587 seq(a(n), n=0..30);
%t A363587 b[n_, x_, y_] := b[n, x, y] = If[Abs[x - y] > 2n, 0, If[n == 0, 1, If[y == 0, 0, b[n-1, y-1, x+1]*y] + b[n-1, y, x]*x + b[n-1, y, x+1]]];
%t A363587 a[n_] := b[n, 0, 0];
%t A363587 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Nov 18 2023, after _Alois P. Heinz_ *)
%Y A363587 Cf. A000110, A290383.
%K A363587 nonn
%O A363587 0,4
%A A363587 _Alois P. Heinz_, Jun 10 2023