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 #12 Nov 07 2021 11:33:57
%S 1,1,1,1,2,2,3,3,5,5,7,6,10,9,13,12,17,17,21,21,28,28,34,33,42,43,51,
%T 53,61,63,73,76,87,91,102,104,119,123,137,143,157,164,179,187,205,215,
%U 232,239,262,272,294,309,327,341,365,381,406,427,448,465
%N Number of partitions of n into 4 distinct nonprime parts.
%p b:= proc(n, i, t) option remember; `if`(n=0,
%p `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
%p `if`(isprime(i), 0, b(n-i, min(n-i, i-1), t-1))))
%p end:
%p a:= n-> b(n$2, 4):
%p seq(a(n), n=19..78); # _Alois P. Heinz_, Feb 12 2021
%t b[n_, i_, t_] := b[n, i, t] = If[n == 0,
%t If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
%t If[PrimeQ[i], 0, b[n - i, Min[n - i, i - 1], t - 1]]]];
%t a[n_] := b[n, n, 4];
%t Table[a[n], {n, 19, 78}] (* _Jean-François Alcover_, Jul 13 2021, after _Alois P. Heinz_ *)
%t Table[Length[Select[IntegerPartitions[n,{4}],Length[#]==Length[ Union[ #]] && NoneTrue[#,PrimeQ]&]],{n,19,80}] (* _Harvey P. Dale_, Nov 07 2021 *)
%Y Cf. A005171, A018252, A096258, A219198, A302479, A341451, A341461, A341464, A341465, A341466, A341467.
%K nonn
%O 19,5
%A _Ilya Gutkovskiy_, Feb 12 2021