login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of subsets of {1..n} that contain exactly three odd numbers.
3

%I #35 Mar 24 2022 08:33:53

%S 0,0,0,0,4,8,32,64,160,320,640,1280,2240,4480,7168,14336,21504,43008,

%T 61440,122880,168960,337920,450560,901120,1171456,2342912,2981888,

%U 5963776,7454720,14909440,18350080,36700160,44564480,89128960,106954752,213909504,254017536,508035072,597688320

%N Number of subsets of {1..n} that contain exactly three odd numbers.

%C 2*a(n-1) for n > 1 is the number of subsets of {1..n} that contain three even numbers. For example, for n=6, 2*a(5)=8 and the 8 subsets are {2,4,6}, {1,2,4,6}, {2,3,4,6}, {2,4,5,6}, {1,2,3,4,6}, {1,2,4,5,6}, {2,3,4,5,6}, {1,2,3,4,5,6}.

%H Colin Barker, <a href="/A331408/b331408.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,8,0,-24,0,32,0,-16).

%F a(n) = binomial((n+1)/2,3) * 2^((n-1)/2), n odd;

%F a(n) = binomial(n/2,3) * 2^(n/2), n even.

%F From _Colin Barker_, Jan 17 2020: (Start)

%F G.f.: 4*x^5*(1 + 2*x) / (1 - 2*x^2)^4.

%F a(n) = 8*a(n-2) - 24*a(n-4) + 32*a(n-6) - 16*a(n-8) for n>8. (End)

%F From _Amiram Eldar_, Mar 24 2022: (Start)

%F Sum_{n>=5} 1/a(n) = (9/8)*(2*log(2)-1).

%F Sum_{n>=5} (-1)^(n+1)/a(n) = (3/8)*(2*log(2)-1). (End)

%e For n = 6, a(6) = 8 and the 8 subsets are {1,3,5}, {1,2,3,5}, {1,3,4,5}, {1,3,5,6}, {1,2,3,4,5}, {1,2,3,5,6}, {1,3,4,5,6}, {1,2,3,4,5,6}.

%t a[n_] := If[OddQ[n], Binomial[(n + 1)/2, 3]*2^((n - 1)/2), Binomial[n/2, 3]*2^(n/2)]; Array[a, 39] (* _Amiram Eldar_, Jan 17 2020 *)

%o (PARI) concat([0,0,0,0], Vec(4*x^5*(1 + 2*x) / (1 - 2*x^2)^4 + O(x^40))) \\ _Colin Barker_, Jan 17 2020

%o (Magma) [IsOdd(n) select Binomial((n+1) div 2, 3)*2^((n-1) div 2) else Binomial((n div 2), 3)*2^(n div 2): n in [1..39]]; // _Marius A. Burtea_, Jan 17 2020

%Y Cf. A330592.

%K nonn,easy

%O 1,5

%A _Enrique Navarrete_, Jan 16 2020