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.
%I A336031 #14 Apr 13 2022 07:40:09 %S A336031 1,1,0,0,4,3,4,0,5,1,70,120,122,130,446,0,277,726,370,1064,13751, %T A336031 38913,41272,81168,137014,84448,300642,490540,517806,341033,1467180, %U A336031 425328,2403512,2916863,4455856,39855808,164203236,216675811,447273890,730795760,1154455982 %N A336031 Number of compositions of n such that the set of parts and the set of multiplicities of parts are equal. %p A336031 b:= proc(n, i, p, f, g) option remember; `if`(n=0, `if`(f=g, p!, 0), %p A336031 `if`(i<1, 0, add(b(n-i*j, i-1, p+j, `if`(j=0, f, {f[], i}), %p A336031 `if`(j=0, g, {g[], j}))/j!, j=0..n/i))) %p A336031 end: %p A336031 a:= n-> b(n$2, 0, {}$2): %p A336031 seq(a(n), n=0..32); %t A336031 b[n_, i_, p_, f_, g_] := b[n, i, p, f, g] = If[n == 0, If[f == g, p!, 0], %t A336031 If[i < 1, 0, Sum[b[n - i*j, i - 1, p + j, %t A336031 If[j == 0, f, Union@Append[f, i]], %t A336031 If[j == 0, g, Union@Append[g, j]]]/j!, {j, 0, n/i}]]]; %t A336031 a[n_] := b[n, n, 0, {}, {}]; %t A336031 Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Apr 13 2022, after _Alois P. Heinz_ *) %Y A336031 Cf. A114640, A336032. %K A336031 nonn %O A336031 0,5 %A A336031 _Alois P. Heinz_, Jul 07 2020