OFFSET
0,3
COMMENTS
See page 6 in the reference.
A zigzag is a substring which is either 010 or 101. The central binary strings are those that contain an equal number of 0's and 1's.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..100
E. Munarini and N. Z. Salvi, Circular Binary Strings without Zigzags, Integers: Electronic Journal of Combinatorial Number Theory 3 (2003), #A19.
FORMULA
a(n) = (1/n)*(3*(n-1)*a(n-1) - 4*(n-4)*a(n-2) + (7*n-27)*a(n-3) - 6*a(n-4) + (7*n-37)*a(n-5) - 3*(n-6)*a(n-6)) for n >= 6. - Andrew Howroyd, Feb 26 2017
EXAMPLE
For n=3 the 6 strings are 000111, 001110, 011100, 111000, 110001, 100011.
MATHEMATICA
a[n_ /; n < 6] := {0, 0, 4, 6, 12, 30}[[n + 1]]; a[n_] := a[n] = (-(3*(n - 6)*a[n - 6]) + (7*n - 37)*a[n - 5] - 6*a[n - 4] + (7*n - 27)*a[n - 3] - 4*(n - 4)*a[n - 2] + 3*(n - 1)*a[n - 1])/n;
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Oct 23 2015
EXTENSIONS
corrected a(1) and a(17)-a(30) from Andrew Howroyd, Feb 26 2017
STATUS
approved