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.

A318685 Triangle read by rows: T(0,0) = 1; T(n,k) = 2 T(n-1,k) - 3 T(n-1,k-1) + T(n-1,k-2) for k = 0..2n; T(n,k)=0 for n or k < 0.

Original entry on oeis.org

1, 2, -3, 1, 4, -12, 13, -6, 1, 8, -36, 66, -63, 33, -9, 1, 16, -96, 248, -360, 321, -180, 62, -12, 1, 32, -240, 800, -1560, 1970, -1683, 985, -390, 100, -15, 1, 64, -576, 2352, -5760, 9420, -10836, 8989, -5418, 2355, -720, 147, -18, 1, 128, -1344, 6496, -19152, 38472, -55692, 59906, -48639, 29953, -13923, 4809, -1197, 203, -21, 1
Offset: 0

Views

Author

Shara Lalo, Sep 06 2018

Keywords

Comments

Row n gives coefficients in expansion of (2 - 3*x + x^2)^n. Row sum s(n)= 1 when n = 0 and s(n)= 0 when n > 0, see link. In the center-justified triangle, the sum of numbers along "first layer" skew diagonals pointing top-right are the coefficients in expansion of 1/(1 - 2*x + 3*x^2 - x^3) and the sum of numbers along "first layer" skew diagonals pointing top-left are the coefficients in expansion of 1/(1-x+3*x^2-2x^3), see links. The generating function of the central terms is 1/sqrt(1 + 6*x + x^2), signed version of Central Delannoy numbers A001850.

Examples

			Triangle begins:
1;
2, -3, 1;
4, -12, 13, -6, 1;
8, -36, 66, -63, 33, -9, 1;
16, -96, 248, -360, 321, -180, 62, -12, 1;
32, -240, 800, -1560, 1970, -1683, 985, -390, 100, -15, 1;
64, -576, 2352, -5760, 9420, -10836, 8989, -5418, 2355, -720, 147, -18, 1;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3.

Crossrefs

Cf. A001850.

Programs

  • Mathematica
    t[n_, k_] := t[n, k] = Sum[(2^(n - k + i)/(n - k + i)!)*((-3)^(k - 2*i)/(k - 2*i)!)*(1/i!)*n!, {i, 0, k}];
      Flatten[Table[t[n, k], {n, 0, 7}, {k, 0, 2*n}]]
    t[0, 0] = 1; t[n_, k_] := t[n, k] = If[n < 0 || k < 0, 0, 2*t[n - 1, k] - 3*t[n - 1, k - 1] + t[n - 1, k - 2]];
      Flatten[Table[t[n, k], {n, 0, 7}, {k, 0, 2*n}]]

Formula

T(0,0) = 1; T(n,k) = 2 T(n-1,k) - 3 T(n-1,k-1) + T(n-1,k-2) for k = 0..2n; T(n,k)=0 for n or k < 0.
G.f.: 1/(1 - 2*t + 3*t*x - t*x^2).