

A164401


Number of binary strings of length n with no substrings equal to 0010 or 0101.


1



1, 2, 4, 8, 14, 25, 45, 81, 146, 264, 477, 861, 1554, 2805, 5063, 9139, 16497, 29779, 53754, 97031, 175150, 316162, 570702, 1030171, 1859556, 3356674, 6059113, 10937270, 19742803, 35637620, 64329263, 116120383, 209608236, 378362622, 682980194, 1232843622
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


LINKS

R. H. Hardin, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (2,1,1,0,0,1).


FORMULA

a(n) = 2*a(n1)  a(n2) + a(n3) + a(n6).  Andrew Howroyd, Feb 14 2018
G.f.: (1 + x^2 + x^3 + x^5)/(1  2*x + x^2  x^3  x^6).  R. J. Mathar, Nov 30 2011


MATHEMATICA

LinearRecurrence[{2, 1, 1, 0, 0, 1}, {1, 2, 4, 8, 14, 25}, 50] (* G. C. Greubel, Sep 18 2017 *)


PROG

(PARI) Vec((1 + x^2 + x^3 + x^5)/(1  2*x + x^2  x^3  x^6) + O(x^40)) \\ G. C. Greubel, Sep 18 2017


CROSSREFS

Sequence in context: A199925 A164388 A164389 * A164387 A164150 A164149
Adjacent sequences: A164398 A164399 A164400 * A164402 A164403 A164404


KEYWORD

nonn


AUTHOR

R. H. Hardin, Aug 14 2009


EXTENSIONS

a(0)a(3) prepended by Andrew Howroyd, Feb 14 2018


STATUS

approved



