cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A331408 #35 Mar 24 2022 08:33:53
%S A331408 0,0,0,0,4,8,32,64,160,320,640,1280,2240,4480,7168,14336,21504,43008,
%T A331408 61440,122880,168960,337920,450560,901120,1171456,2342912,2981888,
%U A331408 5963776,7454720,14909440,18350080,36700160,44564480,89128960,106954752,213909504,254017536,508035072,597688320
%N A331408 Number of subsets of {1..n} that contain exactly three odd numbers.
%C A331408 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 A331408 Colin Barker, <a href="/A331408/b331408.txt">Table of n, a(n) for n = 1..1000</a>
%H A331408 <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 A331408 a(n) = binomial((n+1)/2,3) * 2^((n-1)/2), n odd;
%F A331408 a(n) = binomial(n/2,3) * 2^(n/2), n even.
%F A331408 From _Colin Barker_, Jan 17 2020: (Start)
%F A331408 G.f.: 4*x^5*(1 + 2*x) / (1 - 2*x^2)^4.
%F A331408 a(n) = 8*a(n-2) - 24*a(n-4) + 32*a(n-6) - 16*a(n-8) for n>8. (End)
%F A331408 From _Amiram Eldar_, Mar 24 2022: (Start)
%F A331408 Sum_{n>=5} 1/a(n) = (9/8)*(2*log(2)-1).
%F A331408 Sum_{n>=5} (-1)^(n+1)/a(n) = (3/8)*(2*log(2)-1). (End)
%e A331408 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 A331408 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 A331408 (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 A331408 (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 A331408 Cf. A330592.
%K A331408 nonn,easy
%O A331408 1,5
%A A331408 _Enrique Navarrete_, Jan 16 2020