A275435 Triangle read by rows: T(n,k) is the number of 00-avoiding binary words of length n having degree of asymmetry equal to k (n>=0; 0<=k<=floor(n/2)).
1, 2, 1, 2, 3, 2, 2, 4, 2, 5, 6, 2, 3, 8, 8, 2, 8, 14, 10, 2, 5, 16, 20, 12, 2, 13, 30, 30, 14, 2, 8, 30, 48, 40, 16, 2, 21, 60, 78, 54, 18, 2, 13, 56, 106, 112, 68, 20, 2, 34, 116, 184, 166, 86, 22, 2, 21, 102, 224, 286, 224, 104, 24, 2, 55, 218, 408, 452, 310, 126, 26, 2
Offset: 0
Examples
Row 3 is [3,2] because the 00-avoiding binary words of length 3 are 010, 011, 101, 110, 111, having asymmetry degrees 0, 1, 0, 1, 0, respectively. Triangle starts: 1; 2; 1,2; 3,2; 2,4,2; 5,6,2.
Programs
-
Maple
G := (1+2*z+t*z^2+z^3-t*z^5)/(1-z^2-t*z^2-z^4-t*z^4+t*z^6): Gser := simplify(series(G, z = 0, 20)): for n from 0 to 18 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 18 do seq(coeff(P[n], t, j), j = 0 .. (1/2)*n) end do; # yields sequence in triangular form
-
Mathematica
Table[BinCounts[#, {0, Floor[n/2] + 1, 1}] &@ Map[Total@ BitXor[Take[#, Ceiling[Length[#]/2]], Reverse@ Take[#, -Ceiling[Length[#]/2]]] &, Select[PadLeft[IntegerDigits[#, 2], n] & /@ Range[0, 2^n - 1], Length@ SequenceCases[#, {0, 0}] == 0 &]], {n, 0, 15}] // Flatten (* Michael De Vlieger, Aug 15 2016, Version 10.1 *)
Formula
G.f.: G(t,z) = (1 + 2z + tz^2 +z^3 -tz^5)/(1 - z^2 - tz^2 - z^4 - tz^4 + tz^6).
Comments