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.

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

Original entry on oeis.org

1, -1, 1, 2, -1, -4, 1, 6, 4, -1, -8, -12, 1, 10, 24, 8, -1, -12, -40, -32, 1, 14, 60, 80, 16, -1, -16, -84, -160, -80, 1, 18, 112, 280, 240, 32, -1, -20, -144, -448, -560, -192, 1, 22, 180, 672, 1120, 672, 64, -1, -24, -220, -960, -2016, -1792, -448
Offset: 0

Views

Author

Shara Lalo, May 25 2018

Keywords

Comments

The numbers in rows of the triangle are along skew diagonals pointing top-right in center-justified triangle given in A303872 ((-1+2*x)^n).
The coefficients in the expansion of 1/(1+x-2x^2) are given by the sequence generated by the row sums.
When n is even the numbers in the row are positive, and when n is odd the numbers in the row are negative.

Examples

			Triangle begins:
   1;
  -1;
   1,   2;
  -1,  -4;
   1,   6,    4;
  -1,  -8,  -12;
   1,  10,   24,     8;
  -1, -12,  -40,   -32;
   1,  14,   60,    80,     16;
  -1, -16,  -84,  -160,    -80;
   1,  18,  112,   280,    240,     32;
  -1, -20, -144,  -448,   -560,   -192;
   1,  22,  180,   672,   1120,    672,     64;
  -1, -24, -220,  -960,  -2016,  -1792,   -448;
   1,  26,  264,  1320,   3360,   4032,   1792,    128;
  -1, -28, -312, -1760,  -5280,  -8064,  -5376,  -1024;
   1,  30,  364,  2288,   7920,  14784,  13440,   4608,   256;
  -1, -32, -420, -2912, -11440, -25344, -29568, -15360, -2304;
		

References

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

Crossrefs

Signed version of A128099.
Row sums give A077925.
Cf. A303872, A033999 (column 0).

Programs

  • Mathematica
    t[0, 0] = 1; t[n_, k_] := If[n < 0 || k < 0, 0, -t[n - 1, k] + 2 t[n - 2, k - 1]]; Table[t[n, k], {n, 0, 13}, {k, 0, Floor[n/2]}] // Flatten
  • PARI
    T(n, k) = if ((n<0) || (k<0), 0, if ((n==0) && (k==0), 1, -T(n-1, k) + 2*T(n-2, k-1)));
    tabf(nn) = for (n=0, nn, for (k=0, n\2, print1(T(n,k), ", ")); print); \\ Michel Marcus, May 26 2018

Formula

G.f.: 1 / (1 + t*x - 2t^2).