login
A331576
a(n) is the number of subsets of {1..n} that contain 5 even and 5 odd numbers.
1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 36, 126, 441, 1176, 3136, 7056, 15876, 31752, 63504, 116424, 213444, 365904, 627264, 1019304, 1656369, 2576574, 4008004, 6012006, 9018009, 13117104, 19079424, 27029184, 38291344, 53018784, 73410624, 99628704, 135210384, 180280512, 240374016, 315490896
OFFSET
0,12
COMMENTS
In general, the number of subsets of {1..n} that contain k even and k odd numbers is given by binomial(n/2, k)^2 for n even and binomial((n-1)/2, k)*binomial((n+1)/2, k) for n odd.
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,8,-18,-27,72,48,-168,-42,252,0,-252,42,168,-48,-72,27,18,-8,-2,1).
FORMULA
a(n) = binomial(n/2, 5)^2, for n even;
a(n) = binomial((n-1)/2, 5)*binomial((n+1)/2,5), for n odd.
From Colin Barker, Jan 21 2020: (Start)
G.f.: x^10*(1 + 4*x + 16*x^2 + 24*x^3 + 36*x^4 + 24*x^5 + 16*x^6 + 4*x^7 + x^8) / ((1 - x)^11*(1 + x)^9).
a(n) = 2*a(n-1) + 8*a(n-2) - 18*a(n-3) - 27*a(n-4) + 72*a(n-5) + 48*a(n-6) - 168*a(n-7) - 42*a(n-8) + 252*a(n-9) - 252*a(n-11) + 42*a(n-12) + 168*a(n-13) - 48*a(n-14) - 72*a(n-15) + 27*a(n-16) + 18*a(n-17) - 8*a(n-18) - 2*a(n-19) + a(n-20) for n>19.
(End)
E.g.f.: (cosh(x) - sinh(x))*(99225 + 88200*x + 40950*x^2 + 13050*x^3 + 3225*x^4 + 660*x^5 + 120*x^6 + 20*x^7 + 5*x^8 + (-99225 + 110250*x - 63000*x^2 + 24750*x^3 - 7575*x^4 + 1950*x^5 - 450*x^6 + 100*x^7 - 25*x^8 + 10*x^9 + 2*x^10)*(cosh(2*x) + sinh(2*x)))/29491200. - Stefano Spezia, Jan 27 2020
EXAMPLE
a(11)=6 and the 6 subsets are {1,2,3,4,5,6,7,8,9,10}, {1,2,3,4,5,6,7,8,10,11}, {1,2,3,4,5,6,8,9,10,11}, {1,2,3,4,6,7,8,9,10,11}, {1,2,4,5,6,7,8,9,10,11}, {2,3,4,5,6,7,8,9,10,11}.
MAPLE
a:= n-> ((b, q)-> b(q, 5)*b(n-q, 5))(binomial, iquo(n, 2)):
seq(a(n), n=0..50); # Alois P. Heinz, Jan 30 2020
MATHEMATICA
a[n_] := If[OddQ[n], Binomial[(n - 1)/2, 5]*Binomial[(n + 1)/2, 5], Binomial[n/2, 5]^2]; Array[a, 42, 0] (* Amiram Eldar, Jan 21 2020 *)
PROG
(PARI) concat([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], Vec(x^10*(1 + 4*x + 16*x^2 + 24*x^3 + 36*x^4 + 24*x^5 + 16*x^6 + 4*x^7 + x^8) / ((1 - x)^11*(1 + x)^9) + O(x^40))) \\ Colin Barker, Jan 21 2020
(Magma) [IsOdd(n) select Binomial((n-1) div 2, 5)*Binomial((n+1) div 2, 5) else Binomial(n div 2, 5)^2: n in [0..41]]; // Marius A. Burtea, Jan 21 2020
CROSSREFS
Cf. A028723 (k=2), A331574 (k=3), A331575 (k=4). See comment.
Sequence in context: A264366 A061707 A253945 * A056375 A360588 A321579
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Jan 20 2020
STATUS
approved