A183135 Square array A(n,k) by antidiagonals. A(n,k) is the number of length 2n k-ary words (n,k>=0) that can be built by repeatedly inserting doublets into the initially empty word.
1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 6, 1, 0, 1, 4, 15, 20, 1, 0, 1, 5, 28, 87, 70, 1, 0, 1, 6, 45, 232, 543, 252, 1, 0, 1, 7, 66, 485, 2092, 3543, 924, 1, 0, 1, 8, 91, 876, 5725, 19864, 23823, 3432, 1, 0, 1, 9, 120, 1435, 12786, 71445, 195352, 163719, 12870, 1, 0
Offset: 0
Examples
A(2,2) = 6, because 6 words of length 4 can be built over 2-letter alphabet {a, b} by repeatedly inserting doublets (words with two equal letters) into the initially empty word: aaaa, aabb, abba, baab, bbaa, bbbb. Square array A(n,k) begins: 1, 1, 1, 1, 1, 1, ... 0, 1, 2, 3, 4, 5, ... 0, 1, 6, 15, 28, 45, ... 0, 1, 20, 87, 232, 485, ... 0, 1, 70, 543, 2092, 5725, ... 0, 1, 252, 3543, 19864, 71445, ...
Links
- Alois P. Heinz, Antidiagonals n = 0..140, flattened
- Jason Bell, Marni Mishna, On the Complexity of the Cogrowth Sequence, arXiv:1805.08118 [math.CO], 2018.
- Beth Bjorkman et al., k-foldability of words, arXiv preprint arXiv:1710.10616 [math.CO], 2017.
Crossrefs
Programs
-
Maple
A:= proc(n, k) local j; if n=0 then 1 else k/n *add(binomial(2*n,j) *(n-j) *(k-1)^j, j=0..n-1) fi end: seq(seq(A(n, d-n), n=0..d), d=0..10);
-
Mathematica
A[, 1] = 1; A[n, k_] := If[n == 0, 1, k/n*Sum[Binomial[2*n, j]*(n - j)*(k - 1)^j, {j, 0, n - 1}]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
Comments