OFFSET
1,5
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.
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.)
EXAMPLE
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
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 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Dec 07 2002
STATUS
approved
