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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236340 Number of length n binary words such that maximal runs of 1's are restricted to length one or two and maximal runs of 0's are of odd length. 0
1, 2, 3, 5, 7, 13, 19, 33, 51, 85, 135, 221, 355, 577, 931, 1509, 2439, 3949, 6387, 10337, 16723, 27061, 43783, 70845, 114627, 185473, 300099, 485573, 785671, 1271245, 2056915, 3328161, 5385075, 8713237, 14098311, 22811549 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..35.

FORMULA

G.f.: (1 + 2*x + x^2 - x^4)/(1 - 2*x^2 - x^3).

a(0)=1, a(1)=2, a(2)=3, a(3)=5, a(4)=7 for n>=5, a(n) = 2*a(n-2) + a(n-3).

EXAMPLE

a(4)=7 because we have: 0001, 0101, 0110, 1000, 1010, 1011, 1101.

MATHEMATICA

nn=35; CoefficientList[Series[(1+x+x^2)(1+x/(1-x^2))/(1-(x^2+x^3)/(1-x^2)), {x, 0, nn}], x]

CROSSREFS

Sequence in context: A075580 A077132 A138184 * A273161 A008965 A113864

Adjacent sequences:  A236337 A236338 A236339 * A236341 A236342 A236343

KEYWORD

nonn

AUTHOR

Geoffrey Critzer, Jan 27 2014

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 16 12:48 EST 2019. Contains 320163 sequences. (Running on oeis4.)