reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
a(n) = 2^n * (2 + (n - 1)/2 - (1/2)^(n - 1) - 2 (1 - (1/2)^Floor[floor(n/2]) ) + (1/2)^(Floor[floor(n/2] ) + 1) (1 + (-1)^n)) - 2.
When n=3, : 101, 010 each have 3, ; 100, 011 each have 1, ; 001, 110 each have 2. (000, 111 do not have at least two runs so they do not contribute.) Summing these gives 6+2+4 = 12 so a(3) = 12. (000,111 do not have at least two runs so they do not contribute.
reviewed
editing
proposed
reviewed
editing
proposed
A. Gabhe, Problems and Solutions: 11623, The Amer. Math. Monthly 119 (2012), no. 2, 161.
Aruna Gabhe, <a href="https://www.jstor.org/stable/10.4169/amer.math.monthly.119.02.161">Problem 11623</a>, Am. Math. Monthly 119 (2012) 161.
<a href="/index/Rec">Index to sequences with entries for linear recurrences with constant coefficients</a>, signature (5,-6,-6,16,-8).
<a href="/index/Rec#recLCC">Index to sequences with linear recurrences with constant coefficients</a>, signature (5,-6,-6,16,-8).