login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330300 a(n) is the number of subsets of {1..n} that contain exactly 2 odd and 3 even numbers. 3
0, 0, 0, 0, 0, 0, 3, 6, 24, 40, 100, 150, 300, 420, 735, 980, 1568, 2016, 3024, 3780, 5400, 6600, 9075, 10890, 14520, 17160, 22308, 26026, 33124, 38220, 47775, 54600, 67200, 76160, 92480, 104040, 124848, 139536, 165699, 184110, 216600, 239400, 279300, 307230, 355740, 389620, 448063 (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
Index entries for linear recurrences with constant coefficients, signature (1,5,-5,-10,10,10,-10,-5,5,1,-1).
FORMULA
a(n) = binomial(ceiling(n/2), 2) * binomial(floor(n/2), 3).
From Colin Barker, Mar 01 2020: (Start)
G.f.: x^6*(3 + 3*x + 3*x^2 + x^3) / ((1 - x)^6*(1 + x)^5).
a(n) = a(n-1) + 5*a(n-2) - 5*a(n-3) - 10*a(n-4) + 10*a(n-5) + 10*a(n-6) - 10*a(n-7) - 5*a(n-8) + 5*a(n-9) + a(n-10) - a(n-11) for n>10.
(End)
E.g.f.: (x*(-15 + 3*x - 7*x^2 + 2*x^3 + x^4)*cosh(x) + (15 - 3*x + 12*x^2 - 3*x^3 + x^4 + x^5)*sinh(x))/384. - Stefano Spezia, Mar 02 2020
EXAMPLE
a(7) = 6 and the 6 subsets are {1,2,3,4,6}, {1,2,4,5,6}, {1,2,4,6,7}, {2,3,4,5,6}, {2,3,4,6,7}, {2,4,5,6,7}.
MATHEMATICA
a[n_] := Binomial[Ceiling[n/2], 2] * Binomial[Floor[n/2], 3]; Array[a, 47, 0] (* Amiram Eldar, Mar 01 2020 *)
PROG
(PARI) a(n) = binomial(ceil(n/2), 2) * binomial(floor(n/2), 3) \\ Andrew Howroyd, Mar 01 2020
(PARI) concat([0, 0, 0, 0, 0, 0], Vec(x^6*(3 + 3*x + 3*x^2 + x^3) / ((1 - x)^6*(1 + x)^5) + O(x^40))) \\ Colin Barker, Mar 02 2020
CROSSREFS
Sequence in context: A083525 A106213 A129520 * A047167 A271428 A148649
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Feb 29 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 09:37 EDT 2024. Contains 374547 sequences. (Running on oeis4.)