login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A164139 Number of binary strings of length n with equal numbers of 000 and 011 substrings. 1

%I

%S 1,2,4,6,9,14,22,38,66,120,222,416,792,1512,2909,5610,10851,21042,

%T 40864,79514,154911,302210,590251,1154012,2258488,4423856,8672541,

%U 17014530,33404100,65624480,129002143,253733246,499333096,983154996,1936685718

%N Number of binary strings of length n with equal numbers of 000 and 011 substrings.

%H R. H. Hardin and Alois P. Heinz, <a href="/A164139/b164139.txt">Table of n, a(n) for n = 0..1000</a> (first 501 terms from R. H. Hardin)

%H Shalosh B. Ekhad and Doron Zeilberger, <a href="http://arxiv.org/abs/1112.6207">Automatic Solution of Richard Stanley's Amer. Math. Monthly Problem #11610 and ANY Problem of That Type</a>, arXiv preprint arXiv:1112.6207 [math.CO], 2011. See subpages for rigorous derivations of g.f., recurrence, asymptotics for this sequence. [From _N. J. A. Sloane_, Apr 07 2012]

%p a:= proc(n) a(n):= `if`(n<8, [1, 2, 4, 6, 9, 14, 22, 38][n+1],

%p ((32*n^2-136*n+18)*a(n-1) +(8*n^2-66*n+52)*a(n-2)

%p -(46*n^2-225*n+11)*a(n-3) -2*(n-3)*(4*n-25)*a(n-4)

%p +(72*n^2-448*n+400)*a(n-5) -(69*n^2-445*n+464)*a(n-6)

%p -(4*n^2-54*n-78)*a(n-7) +4*(7*n-4)*(n-6)*a(n-8))/

%p (n*(13*n-56)))

%p end:

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Aug 29 2014

%t a[n_] := If[n < 8, {1, 2, 4, 6, 9, 14, 22, 38}[[n + 1]], (1/(n*(13*n - 56)))*(a*(-(4*n^2 - 54*n - 78))*(n - 7) - (69*n^2 - 445*n + 464)*a[n - 6] + (72*n^2 - 448*n + 400)*a[n - 5] - (46*n^2 - 225*n + 11)*a[n - 3] + (8*n^2 - 66*n + 52)*a[n - 2] + (32*n^2 - 136*n + 18)*a[n - 1] + 4*(n - 6)*(7*n - 4)*a[n - 8] - 2*(n - 3)*(4*n - 25)*a[n - 4])];

%t Table[a[n], {n, 0, 50}] (* _Jean-Fran├žois Alcover_, Nov 11 2017, after _Alois P. Heinz_ *)

%K nonn

%O 0,2

%A _R. H. Hardin_, Aug 11 2009

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 24 21:49 EST 2022. Contains 350565 sequences. (Running on oeis4.)