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”).
%I #13 Dec 18 2020 04:02:09
%S 0,1,0,3,4,5,66,112,456,765,15070,31856,150756,663962,1943046,
%T 44316105,127348864,661449549,3220447446,20913769072,68889553260,
%U 2403704171190,7894983374674,51012052828947,270186003789312,1836634462055350,13402212376611266
%N Number of set partitions of [n] with distinct block sizes and one of the block sizes is 1.
%C Sum of multinomials M(n; lambda), where lambda ranges over all integer partitions of n into distinct parts and one part is 1.
%H Alois P. Heinz, <a href="/A327876/b327876.txt">Table of n, a(n) for n = 0..697</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients">Multinomial coefficients</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_(number_theory)">Partition (number theory)</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%F a(1) = 1: 1.
%F a(2) = 0.
%F a(3) = 3: 12|3, 13|2, 1|23.
%F a(4) = 4: 123|4, 124|3, 134|2, 1|234.
%F a(5) = 5: 1234|5, 1235|4, 1245|3, 1345|2, 1|2345.
%F a(6) = 66: 12345|6, 12346|5, 12356|4, 123|45|6, 123|46|5, 123|4|56, 12456|3, 124|35|6, 124|36|5, 124|3|56, 125|34|6, 12|345|6, 126|34|5, 12|346|5, 125|36|4, 125|3|46, 126|35|4, 12|356|4, 126|3|45, 12|3|456, 13456|2, 134|25|6, 134|26|5, 134|2|56, 135|24|6, 13|245|6, 136|24|5, 13|246|5, 135|26|4, 135|2|46, 136|25|4, 13|256|4, 136|2|45, 13|2|456, 145|23|6, 14|235|6, 146|23|5, 14|236|5, 15|234|6, 1|23456, 16|234|5, 1|234|56, 156|23|4, 15|236|4, 16|235|4, 1|235|46, 1|236|45, 1|23|456, 145|26|3, 145|2|36, 146|25|3, 14|256|3, 146|2|35, 14|2|356, 156|24|3, 15|246|3, 16|245|3, 1|245|36, 1|246|35, 1|24|356, 156|2|34, 15|2|346, 1|256|34, 1|25|346, 16|2|345, 1|26|345.
%p b:= proc(n, i, k) option remember; `if`(i*(i+1)/2<n, 0,
%p `if`(n=0, 1, `if`(i<2, 0, b(n, i-1, `if`(i=k, 0, k)))+
%p `if`(i=k, 0, b(n-i, min(n-i, i-1), k)*binomial(n, i))))
%p end:
%p a:= n-> b(n$2, 0)-b(n$2, 1):
%p seq(a(n), n=0..29);
%t b[n_, i_, k_] := b[n, i, k] = If[i(i+1)/2 < n, 0, If[n == 0, 1, If[i < 2, 0, b[n, i - 1, If[i == k, 0, k]]] + If[i == k, 0, b[n - i, Min[n - i, i - 1], k] Binomial[n, i]]]];
%t a[n_] := b[n, n, 0] - b[n, n, 1];
%t a /@ Range[0, 29] (* _Jean-François Alcover_, Dec 18 2020, after _Alois P. Heinz_ *)
%Y Column k=1 of A327869.
%K nonn
%O 0,4
%A _Alois P. Heinz_, Sep 28 2019