A331420 a(n) is the number of subsets of {1..n} that contain exactly 5 odd numbers.
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
Offset: 1
Examples
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}.
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (0,12,0,-60,0,160,0,-240,0,192,0,-64).
Programs
-
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
-
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 *)
-
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
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)
Comments