cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A387332 Number of binary strings of length n that contain at least one maximal run of ones of even length.

This page as a plain text file.
%I A387332 #20 Sep 05 2025 11:16:18
%S A387332 0,0,1,2,6,13,31,67,148,315,672,1410,2951,6123,12663,26054,53449,
%T A387332 109278,222890,453533,921107,1867427,3780396,7642719,15433236,
%U A387332 31132582,62744943,126354087,254265823,511337918,1027733205,2064578674,4145578078,8320744045,16694805175
%N A387332 Number of binary strings of length n that contain at least one maximal run of ones of even length.
%H A387332 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-5,2).
%F A387332 G.f.: x^2 * (1-x) / ((x^3 - 2*x^2 - x + 1) * (2*x - 1))
%F A387332 a(n) ~ 2^n. - _Stefano Spezia_, Aug 28 2025
%e A387332 a(5) = 13 because there are 13 binary strings of length 5 that contain at least one run of ones of even length: 00011, 00110, 01011, 01100, 01101, 01111, 10011, 10110, 11000, 11001, 11010, 11011, and 11110.
%t A387332 LinearRecurrence[{3,0,-5,2},{0,0,1,2},35] (* or *) CoefficientList[Series[-x^2 * (1-x) / ((x^3 - 2*x^2 - x + 1) * (2*x - 1)),{x,0,34}],x] (* _James C. McMahon_, Sep 05 2025 *)
%Y A387332 Cf. A000079, A027934 (same for odd length).
%K A387332 nonn,easy,new
%O A387332 0,4
%A A387332 _Félix Balado_, Aug 26 2025