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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A164395 Number of binary strings of length n with no substrings equal to 0001 or 0101. 1
1, 2, 4, 8, 14, 24, 42, 72, 122, 208, 354, 600, 1018, 1728, 2930, 4968, 8426, 14288, 24226, 41080, 69658, 118112, 200274, 339592, 575818, 976368, 1655554, 2807192, 4759930, 8071040, 13685426, 23205288, 39347370, 66718224, 113128802, 191823544 (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,2,-2).

FORMULA

a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) - 2*a(n-4). - Andrew Howroyd, Feb 14 2018

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

MATHEMATICA

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

PROG

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

CROSSREFS

Sequence in context: A164400 A164405 A164163 * A164160 A164394 A164171

Adjacent sequences:  A164392 A164393 A164394 * A164396 A164397 A164398

KEYWORD

nonn

AUTHOR

R. H. Hardin, Aug 14 2009

EXTENSIONS

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

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 15 13:07 EST 2018. Contains 317238 sequences. (Running on oeis4.)