OFFSET
0,5
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..3312
Félix Balado and Guénolé C. M. Silvestre, Systematic Enumeration of Fundamental Quantities Involving Runs in Binary Strings, arXiv:2602.10005 [math.CO], 2026. See p. 111, Sect. 8.1.
Index entries for linear recurrences with constant coefficients, signature (4,-4).
FORMULA
For n>=4, a(n) = (5*n-12)*2^(n-5).
G.f.: -x^4*(3*x-4)/(2*x-1)^2. - Alois P. Heinz, Aug 14 2025
For n>=6, a(n) = 4*a(n-1) - 4*a(n-2). - Wesley Ivan Hurt, Feb 20 2026 (range added by Falk Hüffner, May 21 2026)
EXAMPLE
For n=6 there are eight binary strings that contain runs of 1s of length >= 4: 001111, 011110, 011111, 101111, 111100, 111101, 111110 and 111111; the runs of length >= 4 in these strings contain a(6) = 36 ones.
MATHEMATICA
LinearRecurrence [{4, -4}, {0, 0, 0, 0, 4, 13}, 36] (* Hugo Pfoertner, Aug 14 2025, corrected by Michael De Vlieger, Feb 16 2026 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Félix Balado, Aug 14 2025
STATUS
approved
