login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A363454 Number of partitions of [n] such that the number of blocks containing only odd elements equals the number of blocks containing only even elements and no block contains both odd and even elements. 3

%I #17 Jun 02 2023 21:57:23

%S 1,0,1,1,2,4,11,28,87,266,952,3381,13513,53915,237113,1046732,5016728,

%T 24186664,125121009,652084528,3615047527,20211789423,119384499720,

%U 711572380960,4455637803543,28162688795697,186152008588691,1242276416218540,8636436319397292

%N Number of partitions of [n] such that the number of blocks containing only odd elements equals the number of blocks containing only even elements and no block contains both odd and even elements.

%H Alois P. Heinz, <a href="/A363454/b363454.txt">Table of n, a(n) for n = 0..650</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..floor(n/2)} Stirling2(floor(n/2),k) * Stirling2(ceiling(n/2),k).

%F a(2n) = A047797(n).

%e a(0) = 1: () the empty partition.

%e a(1) = 0.

%e a(2) = 1: 1|2.

%e a(3) = 1: 13|2.

%e a(4) = 2: 13|24, 1|2|3|4.

%e a(5) = 4: 135|24, 13|2|4|5, 15|2|3|4, 1|2|35|4.

%e a(6) = 11: 135|246, 13|24|5|6, 13|26|4|5, 13|2|46|5, 15|24|3|6, 1|24|35|6, 15|26|3|4, 15|2|3|46, 1|26|35|4, 1|2|35|46, 1|2|3|4|5|6.

%e a(7) = 28: 1357|246, 135|24|6|7, 137|24|5|6, 13|24|57|6, 135|26|4|7, 135|2|46|7, 137|26|4|5, 13|26|4|57, 137|2|46|5, 13|2|46|57, 13|2|4|5|6|7, 157|24|3|6, 15|24|37|6, 17|24|35|6, 1|24|357|6, 157|26|3|4, 15|26|37|4, 157|2|3|46, 15|2|37|46, 15|2|3|4|6|7, 17|26|35|4, 1|26|357|4, 17|2|35|46, 1|2|357|46, 1|2|35|4|6|7, 17|2|3|4|5|6, 1|2|37|4|5|6, 1|2|3|4|57|6.

%p a:= n-> (h-> add(Stirling2(h, k)*Stirling2(n-h, k), k=0..h))(iquo(n, 2)):

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

%p # second Maple program:

%p b:= proc(n, x, y) option remember; `if`(abs(x-y)>n, 0,

%p `if`(n=0, 1, `if`(x>0, b(n-1, y, x)*x, 0)+b(n-1, y, x+1)))

%p end:

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

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

%Y Bisection gives A047797 (even part).

%Y Cf. A000110, A124419, A124425, A363451.

%K nonn

%O 0,5

%A _Alois P. Heinz_, Jun 02 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 5 21:20 EDT 2024. Contains 374028 sequences. (Running on oeis4.)