A119458 Triangle read by rows: T(n,k) is the number of (marked) circular binary words of length n having k occurrences of 00 (0 <= k <= n).
1, 1, 1, 3, 0, 1, 4, 3, 0, 1, 7, 4, 4, 0, 1, 11, 10, 5, 5, 0, 1, 18, 18, 15, 6, 6, 0, 1, 29, 35, 28, 21, 7, 7, 0, 1, 47, 64, 60, 40, 28, 8, 8, 0, 1, 76, 117, 117, 93, 54, 36, 9, 9, 0, 1, 123, 210, 230, 190, 135, 70, 45, 10, 10, 0, 1, 199, 374, 440, 396, 286, 187, 88, 55, 11, 11, 0, 1
Offset: 0
Examples
T(5,3) = 5 because we have 10000, 01000, 00100, 00010 and 00001. Triangle for T(n,k) begins: n=0: 1; n=1: 1, 1; n=2: 3, 0, 1; n=3: 4, 3, 0, 1; n=4: 7, 4, 4, 0, 1; n=5: 11, 10, 5, 5, 0, 1 n=6: 18, 18, 15, 6, 6, 0, 1; n=7: 29, 35, 28, 21, 7, 7, 0, 1; n=8: 47, 64, 60, 40, 28, 8, 8, 0, 1; n=9: 76, 117, 117, 93, 54, 36, 9, 9, 0, 1; n=10: 123, 210, 230, 190, 135, 70, 45, 10, 10, 0, 1; ... From _Petros Hadjicostas_, Jan 06 2019: (Start) If we take the Taylor expansion of g.f. G(z,t) of T(n,k) around z=0, we get G(z,t) = 1 + (1+t)*z + (3+0*t+t^2)*z^2 + (4+3*t+0*t^2+t^3)*z^3 + (7+4*t+4*t^2+0*t^3+t^4)*z^4 +(11+10*t+5*t^2+5*t^3+0*t^4+t^5)*z^5 + ... One the other hand, if we take the Taylor expansion of the g.f. F(z,t) of W(n,k) = A320341(n, k) around z=0, we get F(z,t) = (1+t)*z + (2+0*t+t^2)*z^2 + (2+t+0*t^2+t^3)*z^3 + (3+t+t^2+0*t^3+t^4)*z^4 + (3+2*t+t^2+t^3+0*t^4+t^5)*z^5 + ... Triangle for W(n,k) begins: n=1: 1, 1; n=2: 2, 0, 1; n=3: 2, 1, 0, 1; n=4: 3, 1, 1, 0, 1; n=5: 3, 2, 1, 1, 0, 1; n=6: 5, 3, 3, 1, 1, 0, 1; n=7: 5, 5, 4, 3, 1, 1, 0, 1; n=8: 8, 8, 8, 5, 4, 1, 1, 0, 1; n=9: 10, 13, 13, 11, 6, 4, 1, 1, 0, 1; n=10: 15, 21, 24, 19, 14, 7, 5, 1, 1, 0, 1; ... For example, for n=4, we have the following marked and unmarked circular binary words (the square brackets denote equivalence classes): k=0: [1111], [1110,1101,1011,0111], [1010,0101], T(4,0) = 7 and W(4,0) = 3; k=1: [1100,1001,0011,0110], T(4,1) = 4 and W(4,1) = 1; k=2: [0001,0010,0100,1000], T(4,2) = 4 and W(4,2) = 1; k=3: none, T(4,3) = 0 = W(4,3); k=4: [0000], T(4,4) = 1 = W(4,4). (End)
Links
- L. Carlitz and R. Scoville, Zero-one sequences and Fibonacci numbers, Fibonacci Quarterly, 15 (1977), 246-254.
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009.
- P. Flajolet and M. Soria, The Cycle Construction, SIAM J. Discr. Math., vol. 4 (1), 1991, pp. 58-60.
- P. Flajolet and M. Soria, The Cycle Construction, SIAM J. Discr. Math., vol. 4 (1), 1991, pp. 58-60.
- P. Hadjicostas and L. Zhang, On cyclic strings avoiding a pattern, Discrete Mathematics, 341 (2018), 1662-1674.
- L. Zhang and P. Hadjicostas, On sequences of independent Bernoulli trials avoiding the pattern '11..1', Math. Scientist, 40 (2015), 89-96.
Programs
-
Maple
T:=proc(n,k): if k>n or k<0 then 0 elif n=0 and k=0 then 1 elif n=1 then 1 elif n=2 and k=0 then 3 elif n=2 and k=1 then 0 else T(n-1,k)+T(n-2,k)+T(n-1,k-1)-T(n-2,k-1) fi end: for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
-
Mathematica
T[n_, k_] := T[n, k] = Which[k > n || k < 0, 0, n == 0 && k == 0, 1, n == 1, 1, n == 2 && k == 0, 3, n == 2 && k == 1, 0, True, T[n-1, k] + T[n-2, k] + T[n-1, k-1] - T[n-2, k-1]]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 11 2019 *)
Formula
T(n,k) = T(n-1,k) + T(n-2,k) + T(n-1,k-1) - T(n-2,k-1) for n >= 3 and k >= 1.
G.f.: G(z,t) = Sum_{n,k >=0} T(n,k)*z^n*t^k = (1 + z^2 - t*z^2)/(1 - z - z^2 - t*z + t*z^2). [edited by Petros Hadjicostas, Jan 05 2019]
T(n,0) = A000204(n) for n >= 1 (Lucas numbers).
T(n,1) = A006490(n) for n >= 1.
Sum_{k=0..n} k*T(n,k) = A057711(n).
Extensions
Name was edited by Petros Hadjicostas, Jan 06 2019
Values of T(9,5) and T(9,6) were corrected in the example by Petros Hadjicostas, Jan 06 2019
Comments