Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Nov 29 2021 01:05:24
%S 1,1,1,1,6,1,1,9,9,1,1,12,108,12,1,1,15,180,180,15,1,1,18,270,3240,
%T 270,18,1,1,21,378,5670,5670,378,21,1,1,24,504,9072,136080,9072,504,
%U 24,1,1,27,648,13608,244944,244944,13608,648,27,1,1,30,810,19440,408240,7348320,408240,19440,810,30,1
%N Triangle T(n, k) = n!*q^k/(n-k)! if floor(n/2) > k-1 otherwise n!*q^(n-k)/k!, with q = 3, read by rows.
%C Row sums are: {1, 2, 8, 20, 134, 392, 3818, 12140, 155282, 518456, 8205362, ...}.
%H G. C. Greubel, <a href="/A174377/b174377.txt">Rows n = 0..50 of the triangle, flattened</a>
%F T(n, k) = n!*q^k/(n-k)! if floor(n/2) > k-1 otherwise n!*q^(n-k)/k!, with q = 3.
%F T(n, n-k) = T(n, k).
%F T(2*n, n) = A221954(n+1). - _G. C. Greubel_, Nov 28 2021
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, 6, 1;
%e 1, 9, 9, 1;
%e 1, 12, 108, 12, 1;
%e 1, 15, 180, 180, 15, 1;
%e 1, 18, 270, 3240, 270, 18, 1;
%e 1, 21, 378, 5670, 5670, 378, 21, 1;
%e 1, 24, 504, 9072, 136080, 9072, 504, 24, 1;
%e 1, 27, 648, 13608, 244944, 244944, 13608, 648, 27, 1;
%e 1, 30, 810, 19440, 408240, 7348320, 408240, 19440, 810, 30, 1;
%t T[n_, k_, q_]:= If[Floor[n/2]>=k, n!*q^k/(n-k)!, n!*q^(n-k)/k!];
%t Table[T[n, k, 3], {n,0,12}, {k,0,n}]//Flatten
%o (Sage)
%o f=factorial
%o def T(n,k,q): return f(n)*q^k/f(n-k) if ((n//2)>k-1) else f(n)*q^(n-k)/f(k)
%o flatten([[T(n,k,3) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Nov 28 2021
%Y Cf. A159623 (q=1), A174376 (q=2), this sequence (q=3), A174378 (q=4).
%Y Cf. A221954.
%K nonn,tabl,easy
%O 0,5
%A _Roger L. Bagula_, Mar 17 2010
%E Edited by _G. C. Greubel_, Nov 28 2021