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.

A226881 Number of n-length binary words w with #(w,0) >= #(w,1) >= 1, where #(w,x) gives the number of digits x in w.

This page as a plain text file.
%I A226881 #24 Jul 15 2022 04:09:23
%S A226881 0,0,2,3,10,15,41,63,162,255,637,1023,2509,4095,9907,16383,39202,
%T A226881 65535,155381,262143,616665,1048575,2449867,4194303,9740685,16777215,
%U A226881 38754731,67108863,154276027,268435455,614429671,1073741823,2448023842,4294967295,9756737701
%N A226881 Number of n-length binary words w with #(w,0) >= #(w,1) >= 1, where #(w,x) gives the number of digits x in w.
%C A226881 a(n) is the number of nonempty subsets of {1,2,...,n} that contain either more even than odd numbers or the same number of even and odd numbers.  For example, for n=5, a(5)=15 and the 15 subsets are {2}, {4}, {1,2}, {1,4}, {2,3}, {2,4}, {2,5}, {3,4}, {4,5}, {1,2,4}, {2,3,4}, {2,4,5}, {1,2,3,4}, {1,2,4,5}, {2,3,4,5}. - _Enrique Navarrete_, Dec 15 2019
%H A226881 Alois P. Heinz, <a href="/A226881/b226881.txt">Table of n, a(n) for n = 0..1000</a>
%F A226881 G.f.: (3*x-1)/(2*(x-1)*(2*x-1)) + 1/(2*sqrt((1+2*x)*(1-2*x))).
%F A226881 a(n) = Sum_{i=1..floor(n/2)} binomial(n,i). - _Wesley Ivan Hurt_, Mar 14 2015
%F A226881 a(n) = A027306(n)-1 = 2^(n-1)-1+((1+(-1)^n)/4)*binomial(n,n/2). - _Alois P. Heinz_, Dec 15 2019
%e A226881 a(4) = 10: 0001, 0010, 0011, 0100, 0101, 0110, 1000, 1001, 1010, 1100.
%p A226881 a:= proc(n) option remember;
%p A226881       `if`(n<4, n*(n-1)*(4-n)/2, (9*(n-1)*(n-4) *a(n-1)
%p A226881       +(12-32*n+6*n^2) *a(n-2) -36*(n-2)*(n-4) *a(n-3)
%p A226881       +8*(n-3)*(3*n-10) *a(n-4))/ (n*(3*n-13)))
%p A226881     end:
%p A226881 seq(a(n), n=0..40);
%t A226881 Table[Sum[Binomial[n, i], {i, Floor[n/2]}], {n, 0, 30}] (* _Wesley Ivan Hurt_, Mar 14 2015 *)
%o A226881 (PARI) a(n) = sum(i=1, n\2, binomial(n,i)); \\ _Michel Marcus_, Jul 15 2022
%Y A226881 Column k=2 of A226874.
%Y A226881 Cf. A027306.
%K A226881 nonn,easy
%O A226881 0,3
%A A226881 _Alois P. Heinz_, Jun 21 2013