login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A238361
Number of length n binary words that contain 111 but do not contain 000 (as contiguous subwords).
1
0, 0, 0, 1, 3, 8, 18, 39, 81, 164, 326, 639, 1239, 2382, 4548, 8635, 16319, 30722, 57650, 107885, 201425, 375322, 698162, 1296801, 2405707, 4457984, 8253228, 15266969, 28220967, 52134000, 96257558, 177640983, 327696621, 604287700, 1113981922, 2053015399
OFFSET
0,5
COMMENTS
For n>=1, a(n) = A000073(n+3) - 2*A000045(n+1).
FORMULA
G.f.: (x^3*(1 + x + x^2))/((1 - x - x^2)*(1 - x - x^2 - x^3)).
a(n) = 2*a(n-1) + a(n-2) - a(n-3) - 2*a(n-4) - a(n-5) for n>5. - Colin Barker, Nov 22 2019
EXAMPLE
There are a(6) = 18 such binary words:
01: 001110
02: 001111
03: 010111
04: 011100
05: 011101
06: 011110
07: 011111
08: 100111
09: 101110
10: 101111
11: 110111
12: 111001
13: 111010
14: 111011
15: 111100
16: 111101
17: 111110
18: 111111
MATHEMATICA
nn=30; CoefficientList[Series[(x^3+x^4+x^5)/(1-2x-x^2+x^3+2x^4+x^5), {x, 0, nn}], x]
PROG
(PARI) concat([0, 0, 0], Vec(x^3*(1 + x + x^2) / ((1 - x - x^2)*(1 - x - x^2 - x^3)) + O(x^40))) \\ Colin Barker, Nov 22 2019
CROSSREFS
Sequence in context: A117727 A117713 A128552 * A178420 A011377 A036385
KEYWORD
nonn,easy
AUTHOR
Geoffrey Critzer, Mar 08 2014
STATUS
approved