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.

A164942 Triangle, read by rows, T(n,k) = (-1)^k*binomial(n, k)*3^(n-k).

Original entry on oeis.org

1, 3, -1, 9, -6, 1, 27, -27, 9, -1, 81, -108, 54, -12, 1, 243, -405, 270, -90, 15, -1, 729, -1458, 1215, -540, 135, -18, 1, 2187, -5103, 5103, -2835, 945, -189, 21, -1, 6561, -17496, 20412, -13608, 5670, -1512, 252, -24, 1, 19683, -59049, 78732, -61236, 30618, -10206, 2268, -324, 27, -1
Offset: 0

Views

Author

Mark Dols, Sep 01 2009

Keywords

Comments

Rows sum up to A000079, antidiagonals sum up to A001906.
Triangle, read by rows, given by [3,0,0,0,0,0,0,0,...] DELTA [ -1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Sep 02 2009
Row n: expansion of (3-x)^n. - Philippe Deléham, Oct 09 2011
Essentially the same as the inverse of A027465, but with opposite signs in every other row. - M. F. Hasler, Feb 17 2020
The inverse of A027465 is (-1)^(n-k)*binomial(n, k)*3^(n - k). - G. C. Greubel, Feb 17 2020

Examples

			Begins as triangle:
    1;
    3,   -1;
    9,   -6,    1;
   27,  -27,    9,   -1;
   81, -108,   54,  -12,    1;
  243, -405,  270,  -90,   15,   -1;
		

Crossrefs

Programs

  • Magma
    [(-1)^k*Binomial(n, k)*3^(n-k): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 17 2020
    
  • Maple
    seq(seq( (-1)^k*binomial(n, k)*3^(n-k), k=0..n), n=0..10); # G. C. Greubel, Feb 17 2020
  • Mathematica
    With[{m = 9}, CoefficientList[CoefficientList[Series[1/(1-3*x+x*y), {x, 0, m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
  • Sage
    [[(-1)^k*binomial(n, k)*3^(n-k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Feb 17 2020

Formula

T(n,k) = (-1)^n*(Inverse of A027465).
T(n,k) = 3*T(n-1,k) - T(n-1,k-1). - Philippe Deléham, Oct 09 2011
G.f.: 1/(1-3*x+x*y). - R. J. Mathar, Aug 11 2015

Extensions

More terms from Philippe Deléham, Oct 09 2011
a(46) corrected by Georg Fischer, Feb 17 2020
Title changed by G. C. Greubel, Feb 17 2020