login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A208901 Number of bitstrings of length n (with at least two runs) where the last two runs have different lengths. 5

%I #23 Jun 07 2023 08:31:23

%S 0,0,4,8,24,48,112,224,480,960,1984,3968,8064,16128,32512,65024,

%T 130560,261120,523264,1046528,2095104,4190208,8384512,16769024,

%U 33546240,67092480,134201344,268402688,536838144,1073676288,2147418112,4294836224,8589803520

%N Number of bitstrings of length n (with at least two runs) where the last two runs have different lengths.

%C A run is a maximal subsequence of (possibly just one) identical bits.

%H Vincenzo Librandi, <a href="/A208901/b208901.txt">Table of n, a(n) for n = 1..1000</a>

%H 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 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-4).

%F a(n) = 2^n - 2^(floor(n/2)+1).

%F a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3), a(0) = 0, a(1) = 0, a(2) = 4.

%F G.f.: 4*x^2/((1 - 2*x)*(1 - 2*x^2)).

%F 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 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 Table[2^n - 2^(Floor[ n/2] + 1) , {n, 1, 40}]

%t LinearRecurrence[{2, 2, -4}, {0, 0, 4}, 40]

%Y Cf. A056453, A208900, A208902, A208903.

%K nonn,easy

%O 1,3

%A _David Nacin_, Mar 03 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:58 EDT 2024. Contains 371906 sequences. (Running on oeis4.)