OFFSET
0,3
COMMENTS
Being composable here means that the length of v equals the number of distinct parts in y.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..800 (first 201 terms from Andrew Howroyd)
FORMULA
a(n) = Sum_{k>=1} binomial(n-1, k-1)*A235998(n, k) for n > 0. - Andrew Howroyd, Jan 01 2023
EXAMPLE
The a(0) = 1 through a(4) = 18 pairs:
()() (1)(1) (2)(2) (3)(3) (4)(4)
(11)(2) (21)(21) (31)(31)
(21)(12) (31)(13)
(12)(21) (31)(22)
(12)(12) (13)(31)
(111)(3) (13)(13)
(13)(22)
(22)(4)
(211)(31)
(211)(13)
(211)(22)
(121)(31)
(121)(13)
(121)(22)
(112)(31)
(112)(13)
(112)(22)
(1111)(4)
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
expand(add(b(n-i*j, i-1, p+j)/j!*`if`(j=0, 1, x), j=0..n/i))))
end:
a:= n-> (p-> add(coeff(p, x, i)*binomial(n-1, i-1), i=0..degree(p)))(b(n$2, 0)):
seq(a(n), n=0..30); # Alois P. Heinz, Jan 01 2023
MATHEMATICA
Table[Length[Select[Tuples[Join@@Permutations/@IntegerPartitions[n], 2], Length[Union[#[[1]]]]==Length[#[[2]]]&]], {n, 0, 10}]
PROG
(PARI) a(n) = {if(n==0, 1, my(s=0); forpart(p=n, p=Vec(p); my(S=Set(p)); s += binomial(n-1, #S-1)*(#p)!/prod(i=1, #S, my(c=#select(t->t==S[i], p)); c! )); s)} \\ Andrew Howroyd, Jan 01 2023
(PARI) \\ for larger n.
a(n) = { local(Cache=Map());
my(F(r, m, p, q) = my(key=[r, m, p, q], z); if(!mapisdefined(Cache, key, &z),
z = if(m==0, if(r==0, p!*binomial(n-1, q-1)), self()(r, m-1, p, q) + sum(j=1, r\m, self()(r-j*m, min(m-1, r-j*m), p+j, q+1)/j!));
mapput(Cache, key, z) ); z);
if(n==0, 1, F(n, n, 0, 0))
} \\ Andrew Howroyd, Jan 01 2023
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 02 2022
EXTENSIONS
Terms a(14) and beyond from Andrew Howroyd, Jan 01 2023
STATUS
approved