A332442 Triangle read by rows, T(n,k) is the number of regular triangles of length k (in some length unit), for k from {1, 2, ... , n}, in a matchstick arrangement with enclosing triangle of length n, but only triangles with orientation opposite to the enclosing triangle are counted.
0, 1, 0, 3, 0, 0, 6, 1, 0, 0, 10, 3, 0, 0, 0, 15, 6, 1, 0, 0, 0, 21, 10, 3, 0, 0, 0, 0, 28, 15, 6, 1, 0, 0, 0, 0, 36, 21, 10, 3, 0, 0, 0, 0, 0, 45, 28, 15, 6, 1, 0, 0, 0, 0, 0, 55, 36, 21, 10, 3, 0, 0, 0, 0, 0, 0, 66, 45, 28, 15, 6, 1, 0, 0, 0, 0, 0, 0, 78, 55, 36, 21, 10, 3, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Examples
The triangle T(n, k) begins: n\k 1 2 3 4 5 6 7 8 9 10 ... ------------------------------- 1: 0 2: 1 0 3: 3 0 0 4 6 1 0 0 5: 10 3 0 0 0 6: 15 6 1 0 0 0 7: 21 10 3 0 0 0 0 8: 28 15 6 1 0 0 0 0 9: 36 21 10 3 0 0 0 0 0 10: 45 28 15 6 1 0 0 0 0 0 ...
Programs
-
Mathematica
T[n_, k_]:= If[k<=Floor[n/2], Binomial[n-2*k+2, 2], 0]; Table[T[n, k], {n,15}, {k,n}]//Flatten (* Amiram Eldar, Apr 23 2020 *)
-
PARI
T(n, k) = if(k <= n\2, binomial(n-2*k+2, 2), 0); matrxi(10,10,n,k,T(n,k)) \\ to see the triangle \\ Michel Marcus, May 05 2020
Formula
Recurrence: T(n, k) = T(n-1, k) + H(n-2*k+1)*(n-2*k+1), for n >=1, k = 1, 2, ..., n, and T(1, 1) = 0. Here H(x) = 1 for x >= 0 and 0 for x < 0 (a step function)..
T(n, k) = binomial(n-2*k+2, 2), for n >= 1 and k = 1, 2, ..., floor(n/2), and 0 for k = floor(n/2) + 1 .. n. See the comment by Andrew Howroyd in A085691.
Comments