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”).

Number of set partitions of [n] such that block sizes are either 1 or 4.
2

%I #27 Jul 28 2023 07:50:46

%S 1,1,1,1,2,6,16,36,106,442,1786,6106,23596,120836,631632,2854216,

%T 13590396,81258556,510768316,2839808572,16008902296,108643656136,

%U 787965516416,5161270717296,33513036683512,253407796702776,2065728484459576,15485032349429176,113510664648701776

%N Number of set partitions of [n] such that block sizes are either 1 or 4.

%F E.g.f.: exp(x + x^4/24).

%F a(n) = n! * Sum_{k=0..floor(n/4)} (1/24)^k * binomial(n-3*k,k)/(n-3*k)!.

%F a(n) = a(n-1) + binomial(n-1,3) * a(n-4) for n > 3.

%F a(n) = hypergeom([-n/4,(1-n)/4,(2-n)/4,(3-n)/4],[],32/3), _Karol A. Penson_, Jul 28 2023.

%p a:= proc(n) option remember; `if`(n=0, 1,

%p `if`(n<4, 0, a(n-4)*binomial(n-1, 3))+a(n-1))

%p end:

%p seq(a(n), n=0..28); # _Alois P. Heinz_, Feb 26 2022

%p seq(round(evalf(hypergeom([-n/4,(1-n)/4,(2-n)/4,(3-n)/4],[],32/3))),n=0..28); # _Karol A. Penson_, Jul 28 2023

%o (PARI) my(N=40, x='x+O('x^N)); Vec(serlaplace(exp(x+x^4/4!)))

%o (PARI) a(n) = n!*sum(k=0, n\4, 1/4!^k*binomial(n-3*k, k)/(n-3*k)!);

%o (PARI) a(n) = if(n<4, 1, a(n-1)+binomial(n-1, 3)*a(n-4));

%Y Cf. A000085, A190865, A275423, A275425.

%Y Cf. A190452, A190875, A351930.

%K nonn

%O 0,5

%A _Seiichi Manyama_, Feb 26 2022