A047171 Number of nonempty subsets of {1,2,...,n} in which exactly 1/2 of the elements are <= (n-1)/2.
0, 0, 0, 2, 3, 9, 14, 34, 55, 125, 209, 461, 791, 1715, 3002, 6434, 11439, 24309, 43757, 92377, 167959, 352715, 646645, 1352077, 2496143, 5200299, 9657699, 20058299, 37442159, 77558759, 145422674, 300540194, 565722719, 1166803109, 2203961429, 4537567649
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Crossrefs
Column k=2 of A219311. - Alois P. Heinz, Nov 17 2012
Programs
-
Magma
[0] cat [Binomial(n, Floor((n-1)/2))-1: n in [1..40]]; // Vincenzo Librandi, Jul 03 2015
-
Maple
a:= n-> binomial(n, iquo(n-1,2))-1: seq(a(n), n=0..40); # Alois P. Heinz, Nov 17 2012
-
Mathematica
a[n_] := Binomial[n, Floor[(n-1)/2]]-1; a[0] = 0; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 03 2015 *)
Formula
a(n) = A037952(n) - 1. Proof by Ira Gessel: Write down the number of such subsets with k elements <= (n-1)/2 as a product of two binomial coefficients, then evaluate the sum using Vandermonde's theorem.
Comments