|
|
A330299
|
|
a(n) is the number of subsets of {1..n} that contain exactly 1 odd and 3 even numbers.
|
|
5
|
|
|
0, 0, 0, 0, 0, 0, 3, 4, 16, 20, 50, 60, 120, 140, 245, 280, 448, 504, 756, 840, 1200, 1320, 1815, 1980, 2640, 2860, 3718, 4004, 5096, 5460, 6825, 7280, 8960, 9520, 11560, 12240, 14688, 15504, 18411, 19380, 22800, 23940, 27930, 29260, 33880, 35420, 40733, 42504, 48576, 50600, 57500
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
The general formula for the number of subsets of {1..n} that contain exactly k odd and j even numbers is binomial(ceiling(n/2), k) * binomial(floor(n/2), j).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = ceiling(n/2) * binomial(floor(n/2), 3).
G.f.: x^6*(3 + x) / ((1 - x)^5*(1 + x)^4).
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n>8.
(End)
E.g.f.: (x*(15 - 3*x - 2*x^2 + x^3)*cosh(x) + (-15 + 3*x - 3*x^2 + x^4)*sinh(x))/96. - Stefano Spezia, Mar 02 2020
|
|
EXAMPLE
|
a(7)=4 and the 4 subsets are {1,2,4,6}, {2,3,4,6}, {2,4,5,6}, {2,4,6,7}.
|
|
MATHEMATICA
|
a[n_] := Ceiling[n/2] * Binomial[Floor[n/2], 3]; Array[a, 51, 0] (* Amiram Eldar, Mar 01 2020 *)
|
|
PROG
|
(PARI) a(n) = ceil(n/2) * binomial(floor(n/2), 3) \\ Andrew Howroyd, Mar 01 2020
(PARI) concat([0, 0, 0, 0, 0, 0], Vec(x^6*(3 + x) / ((1 - x)^5*(1 + x)^4) + O(x^40))) \\ Colin Barker, Mar 02 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|