[go: up one dir, main page]

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!)
A331420 a(n) is the number of subsets of {1..n} that contain exactly 5 odd numbers. 1
0, 0, 0, 0, 0, 0, 0, 0, 16, 32, 192, 384, 1344, 2688, 7168, 14336, 32256, 64512, 129024, 258048, 473088, 946176, 1622016, 3244032, 5271552, 10543104, 16400384, 32800768, 49201152, 98402304, 143130624, 286261248, 405536768, 811073536, 1123024896, 2246049792, 3048210432, 6096420864 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,9
COMMENTS
2*a(n-1) for n > 1 is the number of subsets of {1..n} that contain 5 even numbers.
In general, if a(n) is the number of subsets of {1..n} that contain k odd numbers, then a(n) = binomial((n+1)/2, k)*2^((n-1)/2) for n odd; a(n) = binomial((n/2), k)*2^(n/2) for n even, and 2*a(n-1), n > 1, is the number of subsets of {1..n} that contain k even numbers.
In terms of k, the number a(n) of subsets of {1..n} that contain k even numbers is a(n) = binomial((n-1)/2, k)*2^((n+1)/2) for n odd; a(n) = binomial((n/2), k)* 2^(n/2) for n even. Note that a triangle can be made for different values of k and n.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,12,0,-60,0,160,0,-240,0,192,0,-64).
FORMULA
a(n) = binomial((n+1)/2, 5) * 2^((n-1)/2), n odd;
a(n) = binomial((n/2), 5) * 2^(n/2), n even.
From Colin Barker, Jan 17 2020: (Start)
G.f.: 16*x^9*(1 + 2*x) / (1 - 2*x^2)^6.
a(n) = 12*a(n-2) - 60*a(n-4) + 160*a(n-6) - 240*a(n-8) + 192*a(n-10) - 64*a(n-12) for n>12. (End)
From Amiram Eldar, Mar 24 2022: (Start)
Sum_{n>=9} 1/a(n) = (5/64)*(12*log(2)-7).
Sum_{n>=9} (-1)^(n+1)/a(n) = (5/192)*(12*log(2)-7). (End)
EXAMPLE
a(9)=16 and the 16 subsets are {1,3,5,7,9}, {1,2,3,5,7,9}, {1,3,4,5,7,9}, {1,3,5,6,7,9}, {1,3,5,7,8,9},{1,2,3,4,5,7,9},{1,2,3,5,6,7,9}, {1,2,3,5,7,8,9}, {1,3,4,5,6,7,9}, {1,3,4,5,7,8,9}, {1,3,5,6,7,8,9}, {1,2,3,4,5,6,7,9}, {1,2,3,4,5,7,8,9}, {1,2,3,5,6,7,8,9}, {1,3,4,5,6,7,8,9},{1,2,3,4,5,6,7,8,9}.
MATHEMATICA
a[n_] := If[OddQ[n], Binomial[(n + 1)/2, 5]*2^((n - 1)/2), Binomial[n/2, 5]*2^(n/2)]; Array[a, 38] (* Amiram Eldar, Jan 17 2020 *)
PROG
(PARI) concat([0, 0, 0, 0, 0, 0, 0, 0], Vec(16*x^9*(1 + 2*x) / (1 - 2*x^2)^6 + O(x^40))) \\ Colin Barker, Jan 17 2020
(Magma) [IsOdd(n) select Binomial((n+1) div 2, 5)*2^((n-1) div 2) else Binomial((n div 2), 5)*2^(n div 2): n in [1..38]]; // Marius A. Burtea, Jan 17 2020
CROSSREFS
Sequence in context: A232510 A339356 A282832 * A206344 A119349 A070591
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Jan 16 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 August 30 04:38 EDT 2024. Contains 375526 sequences. (Running on oeis4.)