|
|
A164394
|
|
Number of binary strings of length n with no substrings equal to 0001 or 0100.
|
|
1
|
|
|
1, 2, 4, 8, 14, 24, 42, 74, 130, 228, 400, 702, 1232, 2162, 3794, 6658, 11684, 20504, 35982, 63144, 110810, 194458, 341250, 598852, 1050912, 1844222, 3236384, 5679458, 9966754, 17490434, 30693572, 53863464, 94523790, 165877688, 291095050, 510836202
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*a(n-1) - a(n-2) + a(n-3) for n > 3. - Andrew Howroyd, Feb 14 2018
G.f.: (1 + x^2 + x^3)/(1 - 2*x + x^2 - x^3). - R. J. Mathar, Dec 01 2011
|
|
MAPLE
|
a:= n-> (<<0|1|0>, <0|0|1>, <1|-1|2>>^n. <<2, 2, 4>>)[1, 1]-0^n:
|
|
MATHEMATICA
|
LinearRecurrence[{2, -1, 1}, {1, 2, 4, 8}, 50] (* G. C. Greubel, Sep 18 2017 *)
|
|
PROG
|
(PARI) Vec((1 + x^2 + x^3)/(1 - 2*x + x^2 - x^3) + O(x^40)) \\ G. C. Greubel, Sep 18 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|