A226290 Irregular triangle read by rows: T(n,k) is the number of binary pattern classes in the (3,n)-rectangular grid with k '1's and (3n-k) '0's: two patterns are in same class if one of them can be obtained by a reflection or 180-degree rotation of the other.
1, 1, 2, 2, 1, 1, 2, 6, 6, 6, 2, 1, 1, 4, 13, 27, 39, 39, 27, 13, 4, 1, 1, 4, 22, 60, 139, 208, 252, 208, 139, 60, 22, 4, 1, 1, 6, 34, 129, 371, 794, 1310, 1675, 1675, 1310, 794, 371, 129, 34, 6, 1, 1, 6, 48, 218, 813, 2196, 4767, 8070, 11139, 12300, 11139, 8070, 4767, 2196, 813, 218, 48, 6, 1
Offset: 0
Examples
n\k 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 1 1 2 2 1 2 1 2 6 6 6 2 1 3 1 4 13 27 39 39 27 13 4 1 4 1 4 22 60 139 208 252 208 139 60 22 4 1 5 1 6 34 129 371 794 1310 1675 1675 1310 794 371 129 34 6 1 6 1 6 48 218 813 2196 4767 8070 11139 12300 11139 8070 4767 2196 813 218 48 6 1 ... The length of row n is 3*n+1.
Links
- Yosu Yurramendi, María Merino, Rows n = 0..30 of irregular triangle, flattened
Programs
-
Mathematica
T[n_, k_] := (Binomial[3n, k] + If[OddQ[n] || EvenQ[k], Binomial[Quotient[3 n, 2], Quotient[k, 2]], 0] + Sum[Binomial[n, k - 2i] Binomial[n, i] + Binomial[3 Mod[n, 2], k - 2i] Binomial[3 Quotient[n, 2], i], {i, 0, Quotient[k, 2]}])/4; Table[T[n, k], {n, 0, 6}, {k, 0, 3n}] // Flatten (* Jean-François Alcover, Oct 06 2017, after Andrew Howroyd *)
-
PARI
T(n,k)={(binomial(3*n,k) + if(n%2==1||k%2==0,binomial(3*n\2,k\2),0) + sum(i=0,k\2, binomial(n,k-2*i) * binomial(1*n,i) + binomial(3*(n%2),k-2*i) * binomial(3*(n\2),i)))/4} for(n=0,6,for(k=0,3*n, print1(T(n,k), ", "));print) \\ Andrew Howroyd, May 30 2017
Extensions
Definition corrected by María Merino, May 19 2017
Comments