[seqfan] Re: Number of n-digit numbers the binary expansion of which contains k runs of 1's

Charles Greathouse charles.greathouse at case.edu
Fri Jul 30 17:42:43 CEST 2010


Sum{i=2,n-3})C(i,2)*C(n-i-1,2) is just binomial(n, 5) =
n*(n-1)*(n-2)*(n-3)*(n-4)/120.  So assuming the formula is correct,
a(12) needs to be corrected and the keyword easy should be added.

Charles Greathouse
Analyst/Programmer
Case Western Reserve University

On Fri, Jul 30, 2010 at 10:31 AM, Georgi Guninski <guninski at guninski.com> wrote:
> On Fri, Jul 30, 2010 at 01:51:13PM +0000, Vladimir Shevelev wrote:
>> Dear SeqFans,
>>
>> I have just submitted two sequences:
>>
>>
>> %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 numbers the binary expansion of which contains 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
>>
>>
>
> relatively fast pari code:
>
> a(n)=sum(i=2,n-3,binomial(i,2)*binomial(n-i-1,2)) ;
>
>
> the first 2000 terms seem to satisfy:
>
> -a(n - 3) + 5*a(n - 2) - 10*a(n - 1) - 5*a(n + 1) + a(n + 2) + 10*a(n) -
> 1 = 0
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>




More information about the SeqFan mailing list