OFFSET
1,2
COMMENTS
a(n) is the number of nonempty subsets of {1,2,...,n} that contain either more odd than even numbers or the same number of odd and even numbers. For example, for n=4, a(4)=10 and the 10 subsets are {1}, {3}, {1,3}, {1,2,3}, {1,3,4}; {1,2}, {1,4}, {2,3}, {3,4}, {1,2,3,4}. - Enrique Navarrete, Dec 16 2019
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{m = 1 .. ceiling(n/2)} binomial(n, m), n >= 1.
a(n) = 2^n - 2 - Sum_{i=1..floor(n/2)-1} binomial(n, i), n >= 2; a(1)=1. - Enrique Navarrete, Dec 16 2019
a(2*k+1) = 2^(2*k+1) - (1 + A008549(k)), k >= 0.
a(2*k) = 2^(2*k) - (1 + A000346(k-1)), k >= 1.
O.g.f.: x*(2+3*x+x^2 - (1-x^2)*(1+x)*c(x^2))/((1-(2*x)^2)*(1-x^2)) where c(x) is the o.g.f. of A000108.
O.g.f. for a(2*k+1), k >= 0: (2+x - (1-x)*c(x))/ ((1-4*x)*(1-x)).
O.g.f. for a(2*(k+1)), k >= 0: (3 - (1-x)*c(x))/ ((1-4*x)*(1-x)).
a(n) = A116406(n+1) - 1. - Hugo Pfoertner, Nov 14 2024
EXAMPLE
MATHEMATICA
Table[Sum[Binomial[n, m], {m, Ceiling[n/2]}], {n, 50}] (* Paolo Xausa, Nov 14 2024 *)
PROG
(Haskell)
a258143 = sum . a257241_row -- Reinhard Zumkeller, May 22 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, May 22 2015
STATUS
approved