A166962 Triangle T(n,k) read by rows: T(n,1) = T(n,n)=1, otherwise T(n,k) = (3n-3k+1)*T(n-1,k-1) + k*(3k-2)*T(n-1,k), 1<=k<=n.
1, 1, 1, 1, 12, 1, 1, 103, 69, 1, 1, 834, 2170, 316, 1, 1, 6685, 53910, 27830, 1329, 1, 1, 53496, 1219015, 1652300, 281195, 5412, 1, 1, 427987, 26455251, 81939195, 34800675, 2487917, 21781, 1, 1, 3423918, 563692024, 3700851816, 3327253410
Offset: 1
Examples
1; 1, 1; 1, 12, 1; 1, 103, 69, 1; 1, 834, 2170, 316, 1; 1, 6685, 53910, 27830, 1329, 1; 1, 53496, 1219015, 1652300, 281195, 5412, 1; 1, 427987, 26455251, 81939195, 34800675, 2487917, 21781, 1; 1, 3423918, 563692024, 3700851816, 3327253410, 586846782, 20312292, 87300, 1;
Links
- G. C. Greubel, Table of n, a(n) for the first 25 rows
Programs
-
Maple
A166962 := proc(n,k) if k = 1 or k = n then 1; elif n <= 2 then 1; else (3*n-3*k+1)*procname(n-1,k-1)+k*(3*k-2)*procname(n-1,k) ; end if; end proc: # R. J. Mathar, Mar 26 2013
-
Mathematica
A[n_, 1] := 1; A[n_, n_] := 1; A[n_, k_] := (3*n - 3*k + 1)*A[n - 1, k - 1] + k*(3*k - 2)*A[n - 1, k]; Flatten[Table[A[n, k], {n, 10}, {k, n}]] (* modified by G. C. Greubel, May 29 2016 *)
Formula
T(n, k) = (3*n - 3*k + 1)*T(n - 1, k - 1) + k*(3*k - 2)*T(n - 1, k). - G. C. Greubel, May 29 2016
Comments