|
|
A285917
|
|
Number of ordered set partitions of [n] into two blocks such that equal-sized blocks are ordered with increasing least elements.
|
|
4
|
|
|
1, 6, 11, 30, 52, 126, 219, 510, 896, 2046, 3632, 8190, 14666, 32766, 59099, 131070, 237832, 524286, 956196, 2097150, 3841586, 8388606, 15425136, 33554430, 61908562, 134217726, 248377154, 536870910, 996183062, 2147483646, 3994427099, 8589934590, 16013066072
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,2
|
|
COMMENTS
|
a(n) is odd if and only if n = 2^k with k>0.
|
|
LINKS
|
|
|
MAPLE
|
a:= n-> 2*add(binomial(n, k), k=1..n/2)-
`if`(n::even, 3/2*binomial(n, n/2), 0):
seq(a(n), n=2..40);
# second Maple program:
a:= proc(n) option remember; `if`(n<5, [0, 1, 6, 11][n],
(9*(n-1)*(n-4)*a(n-1)+2*(3*n^2-16*n+6)*a(n-2)
-36*(n-2)*(n-4)*a(n-3)+8*(n-3)*(3*n-10)*a(n-4))
/((3*n-13)*n))
end:
seq(a(n), n=2..40);
|
|
MATHEMATICA
|
a[n_] := 2*Sum[Binomial[n, k], {k, 1, n/2}] - If[EvenQ[n], 3/2*Binomial[n, n/2], 0];
|
|
PROG
|
(PARI) a(n) = 2*sum(k=1, n\2, binomial(n, k)) - if (!(n%2), 3*binomial(n, n/2)/2); \\ Michel Marcus, May 26 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|