A183134 Square array A(n,k) by antidiagonals. A(n,k) is the number of length 2n k-ary words (n,k>=0), either empty or beginning with the first character of the alphabet, that can be built by repeatedly inserting doublets into the initially empty word.
1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 3, 1, 0, 1, 1, 5, 10, 1, 0, 1, 1, 7, 29, 35, 1, 0, 1, 1, 9, 58, 181, 126, 1, 0, 1, 1, 11, 97, 523, 1181, 462, 1, 0, 1, 1, 13, 146, 1145, 4966, 7941, 1716, 1, 0, 1, 1, 15, 205, 2131, 14289, 48838, 54573, 6435, 1, 0
Offset: 0
Examples
A(3,2) = 10, because 10 words of length 6 beginning with the first character of the 2-letter alphabet {a, b} can be built by repeatedly inserting doublets (words with two equal letters) into the initially empty word: aaaaaa, aaaabb, aaabba, aabaab, aabbaa, aabbbb, abaaba, abbaaa, abbabb, abbbba. Square array A(n,k) begins: 1, 1, 1, 1, 1, 1, ... 0, 1, 1, 1, 1, 1, ... 0, 1, 3, 5, 7, 9, ... 0, 1, 10, 29, 58, 97, ... 0, 1, 35, 181, 523, 1145, ... 0, 1, 126, 1181, 4966, 14289, ...
Links
- Alois P. Heinz, Antidiagonals n = 0..140, flattened
- C. Kassel and C. Reutenauer, Algebraicity of the zeta function associated to a matrix over a free group algebra, arXiv preprint arXiv:1303.3481, 2013
- A. Lakshminarayan, Z. Puchala, K. Zyczkowski, Diagonal unitary entangling gates and contradiagonal quantum states, arXiv preprint arXiv:1407.1169, 2014
Crossrefs
Programs
-
Maple
A:= proc(n, k) local j; if n=0 then 1 elif k<=1 then k else add(binomial(2*n,j)*(n-j)*(k-1)^j, j=0..n-1)/n fi end: seq(seq(A(n, d-n), n=0..d), d=0..10);
-
Mathematica
a[n_, k_] := If[ n == 0, 1 , If[ k <= 1, k, Sum [Binomial[2*n, j]*(n-j)*(k-1)^j, {j, 0, n-1}] / n ] ]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 09 2013, translated from Maple *)
Comments