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.
%I A208901 #23 Jun 07 2023 08:31:23 %S A208901 0,0,4,8,24,48,112,224,480,960,1984,3968,8064,16128,32512,65024, %T A208901 130560,261120,523264,1046528,2095104,4190208,8384512,16769024, %U A208901 33546240,67092480,134201344,268402688,536838144,1073676288,2147418112,4294836224,8589803520 %N A208901 Number of bitstrings of length n (with at least two runs) where the last two runs have different lengths. %C A208901 A run is a maximal subsequence of (possibly just one) identical bits. %H A208901 Vincenzo Librandi, <a href="/A208901/b208901.txt">Table of n, a(n) for n = 1..1000</a> %H A208901 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. %H A208901 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-4). %F A208901 a(n) = 2^n - 2^(floor(n/2)+1). %F A208901 a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3), a(0) = 0, a(1) = 0, a(2) = 4. %F A208901 G.f.: 4*x^2/((1 - 2*x)*(1 - 2*x^2)). %F A208901 E.g.f.: 2*(cosh(2*x) - cosh(sqrt(2)*x) + sinh(2*x) - sqrt(2)*sinh(sqrt(2)*x)). - _Stefano Spezia_, Jun 06 2023 %e A208901 If n=3 the bitstrings (with at least two runs) where the last runs have different lengths are 100,011,110,001 so a(3) = 4. %t A208901 Table[2^n - 2^(Floor[ n/2] + 1) , {n, 1, 40}] %t A208901 LinearRecurrence[{2, 2, -4}, {0, 0, 4}, 40] %Y A208901 Cf. A056453, A208900, A208902, A208903. %K A208901 nonn,easy %O A208901 1,3 %A A208901 _David Nacin_, Mar 03 2012