[seqfan] Number of n-digit binary numbers containing k runs of 1's
Vladimir Shevelev
shevelev at bgu.ac.il
Fri Jul 30 16:08:09 CEST 2010
Dear SeqFans,
I have just submitted two sequences (I corrected %N's)
%I A179867
%S A179867 0,0,0,0,1,6,21,56,126,252,462,522
%N A179867 a(n) is the number of n-digit binary numbers containing 3 runs of 1's
%F A179867 a(n)=Sum{i=2,n-3})C(i,2)*C(n-i-1,2). A generalization. For k>=1, the number of n-digit numbers the binary expansion of which contains k runs of 1's equals to Sum{k-1,n-k}C(i,k-1)*C(n-i-1,k-1).
%Y A179867 A000292 A000332 A179865 A179866
%K A179867 nonn
%O A179867 1,6
%I A179868
%S A179868 0,0,0,0,0,1,7,28,84,210,462,924,1716
%N A179868 a(n) is the number of n-digit binary numbers containing 3 runs of 0's
%C A179868 With respect to the number of n-digit numbers the binary expansion of which contains 3 runs of 1's, see A179867.
%F A179868 a(n)=Sum{i=3,n-3}C(i-1,2)*C(n-i,3)=C(n,6). For n>=6, a(n)=A000579(n). A generalization. For k>=1, the number of n-digit numbers the binary expansion of which contains k runs of 0's equals to Sum{i=k,n-k}C(i-1,k-1)*C(n-i,k).
%Y A179868 A179867 A000292 A000332 A179865 A179866
%K A179868 nonn
%O A179868 1,7
General formulas (see %F's) I obtained with help of technique of compositions (they have forms of some convolutions).
More terms? More sequences for k>=4?
Regards,
Vladimir
Shevelev Vladimir
More information about the SeqFan
mailing list