login

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”).

A173077
Triangle T(n, k, q) = binomial(n, k) - 1 + q^floor(n/2)*binomial(n-2, k-1) with T(n, 0, q) = T(n, n, q) = 1 and q = 3, read by rows.
3
1, 1, 1, 1, 4, 1, 1, 5, 5, 1, 1, 12, 23, 12, 1, 1, 13, 36, 36, 13, 1, 1, 32, 122, 181, 122, 32, 1, 1, 33, 155, 304, 304, 155, 33, 1, 1, 88, 513, 1270, 1689, 1270, 513, 88, 1, 1, 89, 602, 1784, 2960, 2960, 1784, 602, 89, 1, 1, 252, 1988, 6923, 13817, 17261, 13817, 6923, 1988, 252, 1
OFFSET
0,5
FORMULA
T(n, k, q) = binomial(n, k) - 1 + q^floor(n/2)*binomial(n-2, k-1) with T(n, 0, q) = T(n, n, q) = 1 and q = 3.
EXAMPLE
Triangle starts:
1;
1, 1;
1, 4, 1;
1, 5, 5, 1;
1, 12, 23, 12, 1;
1, 13, 36, 36, 13, 1;
1, 32, 122, 181, 122, 32, 1;
1, 33, 155, 304, 304, 155, 33, 1;
1, 88, 513, 1270, 1689, 1270, 513, 88, 1;
1, 89, 602, 1784, 2960, 2960, 1784, 602, 89, 1;
1, 252, 1988, 6923, 13817, 17261, 13817, 6923, 1988, 252, 1;
...
Row sums: 1, 2, 6, 12, 49, 100, 491, 986, 5433, 10872, 63223, ...
MATHEMATICA
T[n_, k_]:= If[k==0 || k==n, 1, Binomial[n, k] - 1 + 3^Floor[n/2] Binomial[n-2, k- 1]];
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(Magma)
T:= func< n, k, q | k eq 0 or k eq n select 1 else Binomial(n, k) + q^(Floor(n/2))*Binomial(n-2, k-1) -1 >;
[T(n, k, 3): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 09 2021
(Sage)
def T(n, k, q): return 1 if (k==0 or k==n) else binomial(n, k) + q^(n//2)*binomial(n-2, k-1) -1
flatten([[T(n, k, 3) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 09 2021
CROSSREFS
Cf. A132044 (q=0), A173075 (q=1), A173076 (q=2), this sequence (q=3).
Sequence in context: A166455 A171142 A174037 * A131239 A114033 A334426
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 09 2010
STATUS
approved