login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A208903 The sum over all bitstrings b of length n with at least two runs of the number of runs in b not immediately followed by a longer run. 5
0, 4, 12, 32, 76, 180, 412, 940, 2108, 4700, 10364, 22716, 49404, 106876, 229884, 492284, 1049596, 2229756, 4720636, 9964540, 20975612, 44046332, 92282876, 192950268, 402669564, 838885372, 1744863228, 3623927804, 7516258300, 15569354748, 32212385788 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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

REFERENCES

A. Gabhe, Problems and Solutions: 11623, The Amer. Math. Monthly 119 (2012), no. 2, 161.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (5,-6,-6,16,-8).

FORMULA

a(n) = 2^n * (2 + (n - 1)/2 - (1/2)^(n - 1) - 2 (1 - (1/2)^Floor[n/2]) + (1/2)^(Floor[n/2] + 1) (1 + (-1)^n)) - 2.

a(n) = A208902(n) - 2.

a(n) = 5*a(n-1) - 6*a(n-2) - 6*a(n-3) + 16*a(n-4) - 8*a(n-5), a(1) = 0, a(2) = 4, a(3) = 12, a(4) = 32, a(5) = 76.

G.f.: (4*x - 8*x^2 - 4*x^3 + 12*x^4)/(1 - 5*x + 6*x^2 + 6*x^3 - 16*x^4 +

   8*x^5).

EXAMPLE

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.

MATHEMATICA

Table[2^n*(2 + (n-1)/2 - (1/2)^(n-1) - 2*(1 - (1/2)^Floor[n/2]) + (1/2)^(Floor[n/2] + 1) (1 + (-1)^n)) - 2, {n, 1, 40}]

LinearRecurrence[{5, -6, -6, 16, -8}, {0, 4, 12, 32, 76}, 40]

CROSSREFS

Cf. A056453, A208900-A208902.

Sequence in context: A001934 A004403 A084566 * A079769 A107035 A260145

Adjacent sequences:  A208900 A208901 A208902 * A208904 A208905 A208906

KEYWORD

nonn,easy

AUTHOR

David Nacin, Mar 03 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified December 9 00:45 EST 2016. Contains 278959 sequences.