login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331408 Number of subsets of {1..n} that contain three odd numbers. 3
0, 0, 0, 0, 4, 8, 32, 64, 160, 320, 640, 1280, 2240, 4480, 7168, 14336, 21504, 43008, 61440, 122880, 168960, 337920, 450560, 901120, 1171456, 2342912, 2981888, 5963776, 7454720, 14909440, 18350080, 36700160, 44564480, 89128960, 106954752, 213909504, 254017536, 508035072, 597688320 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

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}.

LINKS

Colin Barker, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (0,8,0,-24,0,32,0,-16).

FORMULA

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

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

From Colin Barker, Jan 17 2020: (Start)

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

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

(End)

EXAMPLE

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}.

MATHEMATICA

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 *)

PROG

(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

(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

CROSSREFS

Cf. A330592.

Sequence in context: A034041 A050442 A229953 * A291938 A094015 A094867

Adjacent sequences:  A331405 A331406 A331407 * A331409 A331410 A331411

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 11 08:10 EDT 2020. Contains 335626 sequences. (Running on oeis4.)