A078805 Triangular array T given by T(n,k) = number of 01-words of length n having exactly k 1's, every runlength of 1's odd and initial letter 0.
1, 1, 1, 1, 2, 0, 1, 3, 1, 1, 1, 4, 3, 2, 0, 1, 5, 6, 4, 2, 1, 1, 6, 10, 8, 6, 2, 0, 1, 7, 15, 15, 13, 6, 3, 1, 1, 8, 21, 26, 25, 16, 9, 2, 0, 1, 9, 28, 42, 45, 36, 22, 9, 4, 1, 1, 10, 36, 64, 77, 72, 50, 28, 12, 2, 0, 1, 11, 45, 93, 126, 133, 106, 70, 34, 13, 5, 1, 1, 12, 55, 130, 198, 232
Offset: 1
Examples
T(5,2) counts the words 01010, 01001, 00101. Top of triangle T: 1 = T(1,0) 1 1 = T(2,0) T(2,1) 1 2 0 = T(3,0) T(3,1) T(3,2) 1 3 1 1 1 4 3 2 0
References
- Clark Kimberling, Binary words with restricted repetitions and associated compositions of integers, in Applications of Fibonacci Numbers, vol.10, Proceedings of the Eleventh International Conference on Fibonacci Numbers and Their Applications, William Webb, editor, Congressus Numerantium, Winnipeg, Manitoba 194 (2009) 141-151.
Programs
-
Mathematica
Clear[t]; t[n_,k_]:=0/;Not[0<=n<=200&&0<=k<=200]; t[1,0]=1;t[2,0]=1;t[2,1]=1; t[3,0]=1;t[3,1]=2;t[3,2]=0; t[4,2]=1; t[n_,k_]:=t[n,k]=t[n-2,k]+t[n-2,k-1]+t[n-2,k-2]+t[n-3,k-1]-t[n-4,k-2] u=Table[t[n,k],{n,1,12},{k,0,n-1}] Grid[u] (* triangle *) Flatten[u] (* sequence *) (* Clark Kimberling Jul 18 2025 *)
Formula
T(n, k)=T(n-2, k)+T(n-2, k-1)+T(n-2, k-2)+T(n-3, k-1)-T(n-4, k-2) for 0<=k<=n, n>=4. (All numbers T(i, j) not in the array are 0, by definition of T.)