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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A330592 a(n) is the number of subsets of {1,2,...,n} that contain exactly two odd numbers. 4
 0, 0, 2, 4, 12, 24, 48, 96, 160, 320, 480, 960, 1344, 2688, 3584, 7168, 9216, 18432, 23040, 46080, 56320, 112640, 135168, 270336, 319488, 638976, 745472, 1490944, 1720320, 3440640, 3932160, 7864320, 8912896, 17825792, 20054016, 40108032, 44826624, 89653248 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS 2*a(n-1) for n>1 is the number of subsets of {1,2,...,n} that contain exactly two even numbers.  For example, for n=5, 2*a(4)=8 and the 8 subsets are {2,4}, {1,2,4}, {2,3,4}, {2,4,5}, {1,2,3,4}, {1,2,4,5}, {2,3,4,5}, {1,2,3,4,5}. - Enrique Navarrete, Dec 20 2019 LINKS Colin Barker, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (0,6,0,-12,0,8). FORMULA a(n) = binomial((n+1)/2,2) * 2^((n-1)/2), n odd; a(n) = binomial(n/2,2) * 2^(n/2), n even. G.f.: 2*(2*x+1)*x^3/(1-2*x^2)^3. a(n) = 6*a(n-2) - 12*a(n-4) + 8*a(n-6) for n>6. - Colin Barker, Dec 20 2019 EXAMPLE For example, for n=5, a(5)=12 and the 12 subsets are {1,3}, {1,5}, {3,5}, {1,2,3}, {1,2,5}, {1,3,4}, {1,4,5}, {2,3,5}, {3,4,5}, {1,2,3,4}, {1,2,4,5}, {2,3,4,5}. PROG (MAGMA) [IsEven(n) select Binomial(n div 2, 2)*2^(n div 2) else Binomial((n+1) div 2, 2)*2^((n-1) div 2):n in [1..40]]; // Marius A. Burtea, Dec 19 2019 (PARI) concat([0, 0], Vec(2*x^3*(1 + 2*x) / (1 - 2*x^2)^3 + O(x^40))) \\ Colin Barker, Dec 20 2019 CROSSREFS Cf. A089822 (with exactly two primes). Sequence in context: A230481 A212169 A108720 * A089822 A079352 A089888 Adjacent sequences:  A330589 A330590 A330591 * A330593 A330594 A330595 KEYWORD nonn,easy AUTHOR Enrique Navarrete, Dec 18 2019 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.

Last modified August 15 13:27 EDT 2020. Contains 336504 sequences. (Running on oeis4.)