

A164389


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


1



1, 2, 4, 8, 14, 25, 45, 81, 145, 260, 467, 838, 1503, 2697, 4840, 8684, 15581, 27958, 50166, 90012, 161509, 289799, 519989, 933019, 1674126, 3003903, 5389930, 9671201, 17353133, 31136896, 55869228, 100246695, 179873620, 322748972, 579111590, 1039105525
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..2000 (first 500 terms from R. H. Hardin)
Index entries for linear recurrences with constant coefficients, signature (1,0,2,1)


FORMULA

G.f.: (x+1)*(x^2+1)^2/(x^4+2*x^3+x1).  R. J. Mathar, Dec 01 2011


MATHEMATICA

LinearRecurrence[{1, 0, 2, 1}, {1, 2, 4, 8, 14, 25}, 50] (* G. C. Greubel, Sep 18 2017; amended for offset 0 by Georg Fischer, Apr 02 2019 *)


PROG

(PARI) x='x+O('x^50); Vec(((x+1)*(x^2+1)^2)/(1x2*x^3x^4)) \\ G. C. Greubel, Sep 18 2017; amended for offset 0 by Georg Fischer, Apr 02 2019


CROSSREFS

Sequence in context: A281810 A199925 A164388 * A164401 A164387 A164150
Adjacent sequences: A164386 A164387 A164388 * A164390 A164391 A164392


KEYWORD

nonn,easy


AUTHOR

R. H. Hardin, Aug 14 2009


EXTENSIONS

Edited by Alois P. Heinz, Oct 11 2017


STATUS

approved



