[go: up one dir, main page]

login
A173118
Triangle T(n, k, q) = q*[n=2] + Sum_{j=0..5} q^j*binomial(n-2*j, k-j)*[n>2*j] with T(n,0) = T(n,n) = 1 for q = 2, read by rows.
6
1, 1, 1, 1, 4, 1, 1, 5, 5, 1, 1, 6, 10, 6, 1, 1, 7, 20, 20, 7, 1, 1, 8, 27, 40, 27, 8, 1, 1, 9, 35, 75, 75, 35, 9, 1, 1, 10, 44, 110, 150, 110, 44, 10, 1, 1, 11, 54, 154, 276, 276, 154, 54, 11, 1, 1, 12, 65, 208, 430, 552, 430, 208, 65, 12, 1
OFFSET
0,5
FORMULA
T(n, k, q) = q*[n=2] + Sum_{j=0..5} q^j*binomial(n-2*j, k-j)*[n>2*j] with T(n,0) = T(n,n) = 1 for q = 2.
Sum_{k=0..n} T(n, k, q) = [n=0] + q*[n=2] + Sum_{j=0..5} q^j*2^(n-2*j)*[n > 2*j] for q = 2. - G. C. Greubel, Apr 27 2021
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 5, 5, 1;
1, 6, 10, 6, 1;
1, 7, 20, 20, 7, 1;
1, 8, 27, 40, 27, 8, 1;
1, 9, 35, 75, 75, 35, 9, 1;
1, 10, 44, 110, 150, 110, 44, 10, 1;
1, 11, 54, 154, 276, 276, 154, 54, 11, 1;
1, 12, 65, 208, 430, 552, 430, 208, 65, 12, 1;
MATHEMATICA
T[n_, k_, q_]:= If[k==0 || k==n, 1, q*Boole[n==2] + Sum[q^j*Binomial[n-2*j, k-j]*Boole[n>2*j], {j, 0, 5}]];
Table[T[n, k, 2], {n, 0, 12}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Apr 27 2021 *)
PROG
(Sage)
@CachedFunction
def T(n, k, q): return 1 if (k==0 or k==n) else q*bool(n==2) + sum( q^j*binomial(n-2*j, k-j)*bool(n>2*j) for j in (0..5) )
flatten([[T(n, k, 2) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 27 2021
CROSSREFS
Cf. A007318 (q=0), A072405 (q= -1), A173117 (q=1), this sequence (q=2), A173119 (q=3), A173120 (q= -4), A173122.
Sequence in context: A099575 A173740 A028275 * A147289 A147566 A204621
KEYWORD
nonn,tabl,easy,less
AUTHOR
Roger L. Bagula, Feb 10 2010
EXTENSIONS
Edited by G. C. Greubel, Apr 27 2021
STATUS
approved