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.

A317498 Triangle read by rows of coefficients in expansions of (-2 + 3*x)^n, where n is nonnegative integer.

Original entry on oeis.org

1, -2, 3, 4, -12, 9, -8, 36, -54, 27, 16, -96, 216, -216, 81, -32, 240, -720, 1080, -810, 243, 64, -576, 2160, -4320, 4860, -2916, 729, -128, 1344, -6048, 15120, -22680, 20412, -10206, 2187, 256, -3072, 16128, -48384, 90720, -108864, 81648, -34992, 6561, -512, 6912, -41472, 145152, -326592, 489888, -489888, 314928, -118098, 19683
Offset: 0

Views

Author

Zagros Lalo, Jul 31 2018

Keywords

Comments

Row n gives coefficients in expansion of (-2 + 3*x)^n.
This is a signed version of A013620.
The coefficients in the expansion of 1/(1-x) are given by the sequence generated by the row sums.
The row sums give A000012 (The simplest sequence of positive numbers: the all 1's sequence).
The numbers in rows of triangles in A302747 and A303941 (Triangle of coefficients of Fermat polynomials) are along first layer skew diagonals pointing top-right and top-left in center-justified triangle of coefficients in expansions of (-2 + 3*x)^n, see links.

Examples

			Triangle begins:
     1;
    -2,     3;
     4,   -12,      9;
    -8,    36,    -54,     27;
    16,   -96,    216,   -216,      81;
   -32,   240,   -720,   1080,    -810,     243;
    64,  -576,   2160,  -4320,    4860,   -2916,     729;
  -128,  1344,  -6048,  15120,  -22680,   20412,  -10206,   2187;
   256, -3072,  16128, -48384,   90720, -108864,   81648, -34992,    6561;
  -512,  6912, -41472, 145152, -326592,  489888, -489888, 314928, -118098, 19683;
  ...
		

References

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

Crossrefs

Row sums give A000012.
Cf. A013620 ((2+3*x)^n).

Programs

  • GAP
    Flat(List([0..8],n->List([0..n],k->(-2)^(n-k)*3^k/(Factorial(n-k)*Factorial(k))*Factorial(n)))); # Muniru A Asiru, Aug 01 2018
  • Mathematica
    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]]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten
    t[n_, k_] := t[n, k] = ((-2)^(n - k) 3^k)/((n - k)! k!) n!;Table[t[n, k], {n, 0, 9}, {k, 0, n} ] // Flatten
    Table[CoefficientList[(-2 + 3 x)^n, x], {n, 0, 9}] // Flatten
  • PARI
    trianglerows(n) = my(v=[]); for(k=0, n-1, v=Vec((-2+3*x)^k + O(x^(k+1))); print(v))
    /* Print initial 10 rows of triangle as follows */
    trianglerows(10) \\ Felix Fröhlich, Jul 31 2018
    

Formula

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