login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Total number of blocks containing only elements of the same parity in all partitions of [n].
7

%I #23 Sep 10 2023 09:47:38

%S 0,1,2,7,24,97,412,1969,9898,54461,313944,1947613,12603100,86760255,

%T 620559230,4682462777,36586620348,299664171115,2534306825064,

%U 22355119509231,203115201624030,1917124624702475,18598998656476220,186822424157036439,1925326063016510832

%N Total number of blocks containing only elements of the same parity in all partitions of [n].

%H Alois P. Heinz, <a href="/A363434/b363434.txt">Table of n, a(n) for n = 0..250</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%F a(n) = Sum_{k=0..n} k * A124424(n,k).

%F a(n) = A363452(n) + A363453(n).

%F a(n) mod 2 = A000035(n).

%e a(3) = 7 = 0 + 1 + 2 + 1 + 3 : 123, 12|3, 13|2, 1|23, 1|2|3.

%p b:= proc(n, e, o, m) option remember; `if`(n=0, e+o,

%p (e+m)*b(n-1, o, e, m)+b(n-1, o, e+1, m)+

%p `if`(o=0, 0, o*b(n-1, o-1, e, m+1)))

%p end:

%p a:= n-> b(n, 0$3):

%p seq(a(n), n=0..24);

%t b[n_, e_, o_, m_] := b[n, e, o, m] = If[n == 0, e + o, (e + m)*b[n-1, o, e, m] + b[n - 1, o, e + 1, m] + If[o == 0, 0, o*b[n - 1, o - 1, e, m + 1]]];

%t a[n_] := b[n, 0, 0, 0];

%t Table[a[n], {n, 0, 24}] (* _Jean-François Alcover_, Sep 10 2023, after _Alois P. Heinz_ *)

%Y Cf. A000035, A124424, A363435, A363451, A363452, A363453.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Jun 01 2023