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.

A317502 Triangle read by rows: T(0,0) = 1; T(n,k) = 3 T(n-1,k) - 2 * T(n-3,k-1) for k = 0..floor(n/3); T(n,k)=0 for n or k < 0.

Original entry on oeis.org

1, 3, 9, 27, -2, 81, -12, 243, -54, 729, -216, 4, 2187, -810, 36, 6561, -2916, 216, 19683, -10206, 1080, -8, 59049, -34992, 4860, -96, 177147, -118098, 20412, -720, 531441, -393660, 81648, -4320, 16, 1594323, -1299078, 314928, -22680, 240, 4782969, -4251528, 1180980, -108864, 2160
Offset: 0

Views

Author

Shara Lalo, Aug 02 2018

Keywords

Comments

The numbers in rows of the triangle are along "second layer" skew diagonals pointing top-right in center-justified triangle given in A303901 ((3-2*x)^n) and along "second layer" skew diagonals pointing top-left in center-justified triangle given in A317498 ((-2+3x)^n), see links. (Note: First layer skew diagonals in center-justified triangles of coefficients in expansions of (3-2*x)^n and (-2+3x)^n are given in A303941 and A302747 respectively.) The coefficients in the expansion of 1/(1-3x+2x^3) are given by the sequence generated by the row sums. The row sums give A077846. If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 2.7320508075688772... (A090388: 1+sqrt(3)), when n approaches infinity.

Examples

			Triangle begins:
        1;
        3;
        9;
        27,        -2;
        81,       -12;
       243,       -54;
       729,      -216,        4;
      2187,      -810,       36;
      6561,     -2916,      216;
     19683,    -10206,     1080,       -8;
     59049,    -34992,     4860,      -96;
    177147,   -118098,    20412,     -720;
    531441,   -393660,    81648,    -4320,    16;
   1594323,  -1299078,   314928,   -22680,   240;
   4782969,  -4251528,  1180980,  -108864,  2160;
  14348907, -13817466,  4330260,  -489888, 15120,  -32;
  43046721, -44641044, 15588936, -2099520, 90720, -576;
		

References

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

Crossrefs

Row sums give A077846.
Cf. A090388.

Programs

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

Formula

T(n,k) = 3^(n - 3k) * (-2)^k / ((n - 3k)! k!) * (n - 2k)! where n is a nonnegative integer and k = 0..floor(n/3).