cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A336032 Number of compositions of n such that the set of parts and the set of multiplicities of parts are disjoint.

This page as a plain text file.
%I A336032 #19 Apr 13 2022 07:40:13
%S A336032 1,0,2,2,2,4,6,6,14,34,79,159,227,429,727,1146,1999,3238,5018,8976,
%T A336032 14977,24768,38400,70678,152535,295493,617675,1404099,3023086,6685876,
%U A336032 14230031,30218806,62175519,127820798,257285277,516574751,1021334631,2009999405,3917878730
%N A336032 Number of compositions of n such that the set of parts and the set of multiplicities of parts are disjoint.
%p A336032 b:= proc(n, i, p, f, g) option remember; `if`(f intersect g<>{}, 0,
%p A336032       `if`(n=0, p!, `if`(i<1, 0, add(b(n-i*j, i-1, p+j, `if`(j=0,
%p A336032        f, {f[], i}), `if`(j=0, g, {g[], j}))/j!, j=0..n/i))))
%p A336032     end:
%p A336032 a:= n-> b(n$2, 0, {}$2):
%p A336032 seq(a(n), n=0..32);
%t A336032 b[n_, i_, p_, f_, g_] := b[n, i, p, f, g] = If[f ~Intersection~ g != {}, 0,
%t A336032      If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, i - 1, p + j,
%t A336032      If[j == 0, f, Union@Append[f, i]],
%t A336032      If[j == 0, g, Union@Append[g, j]]]/j!, {j, 0, n/i}]]]];
%t A336032 a[n_] := b[n, n, 0, {}, {}];
%t A336032 Table[a[n], {n, 0, 38}] (* _Jean-François Alcover_, Apr 13 2022, after _Alois P. Heinz_ *)
%Y A336032 Cf. A114639, A336031.
%K A336032 nonn
%O A336032 0,3
%A A336032 _Alois P. Heinz_, Jul 07 2020