A384154 a(n) is the number of binary strings of length n whose shortest run of 1s is of length 2.
0, 0, 1, 2, 3, 5, 10, 20, 38, 70, 128, 234, 427, 776, 1404, 2531, 4550, 8161, 14608, 26099, 46550, 82901, 147441, 261913, 464759, 823902, 1459287, 2582615, 4567357, 8072082, 14257631, 25169443, 44410452, 78325112, 138082349, 243339192, 428683436, 754961473
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (4,-6,5,-2,-1,1,-1).
Programs
-
Mathematica
LinearRecurrence[{4,-6,5,-2,-1,1,-1},{0,0,1,2,3,5,10},40] (* Harvey P. Dale, Jun 24 2025 *)
Formula
G.f.: x^2 * (1 - x)^2/(((1 - x)^2 - x^3) * ((1 - x)^2 - x^4)).