cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A173120 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 = -4, read by rows.

Original entry on oeis.org

1, 1, 1, 1, -2, 1, 1, -1, -1, 1, 1, 0, -2, 0, 1, 1, 1, 14, 14, 1, 1, 1, 2, 15, 28, 15, 2, 1, 1, 3, 17, -21, -21, 17, 3, 1, 1, 4, 20, -4, -42, -4, 20, 4, 1, 1, 5, 24, 16, 210, 210, 16, 24, 5, 1, 1, 6, 29, 40, 226, 420, 226, 40, 29, 6, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 10 2010

Keywords

Examples

			Triangle begins as:
  1;
  1,  1;
  1, -2,  1;
  1, -1, -1,   1;
  1,  0, -2,   0,   1;
  1,  1, 14,  14,   1,   1;
  1,  2, 15,  28,  15,   2,   1;
  1,  3, 17, -21, -21,  17,   3,  1;
  1,  4, 20,  -4, -42,  -4,  20,  4,  1;
  1,  5, 24,  16, 210, 210,  16, 24,  5, 1;
  1,  6, 29,  40, 226, 420, 226, 40, 29, 6, 1;
		

Crossrefs

Cf. A007318 (q=0), A072405 (q= -1), A173117 (q=1), A173118 (q=2), A173119 (q=3), this sequence (q= -4), A173122.

Programs

  • 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,-4], {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Apr 27 2021 *)
  • 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,-4) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 27 2021

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 = -4.
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 = -4. - G. C. Greubel, Apr 27 2021

Extensions

Edited by G. C. Greubel, Apr 27 2021