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.

A123956 Triangle of coefficients of polynomials P(k) = 2*X*P(k - 1) - P(k - 2), P(0) = -1, P(1) = 1 + X, with twisted signs.

Original entry on oeis.org

-1, 1, 1, -1, -2, -2, 1, -3, 4, 4, -1, 4, 8, -8, -8, 1, 5, -12, -20, 16, 16, -1, -6, -18, 32, 48, -32, -32, 1, -7, 24, 56, -80, -112, 64, 64, -1, 8, 32, -80, -160, 192, 256, -128, -128, 1, 9, -40, -120, 240, 432, -448, -576, 256, 256, -1, -10, -50, 160, 400, -672, -1120, 1024, 1280, -512, -512
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 27 2006

Keywords

Comments

Up to signs also the coefficients of polynomials y(n+1) = y(n-1) - 2*h*y(n), arising when the ODE y' = -y is numerically solved with the leapfrog (a.k.a. two-step Nyström) method, with y(0) = 1, y(1) = 1 - h. In this case, the coefficients are negative exactly for the odd powers of h. - M. F. Hasler, Nov 30 2022

Examples

			Triangle begins:
  {-1},
  { 1,   1},
  {-1,  -2,  -2},
  { 1,  -3,   4,    4},
  {-1,   4,   8,   -8,   -8},
  { 1,   5, -12,  -20,   16,   16},
  {-1,  -6, -18,   32,   48,  -32,   -32},
  { 1,  -7,  24,   56,  -80, -112,    64,   64},
  {-1,   8,  32,  -80, -160,  192,   256, -128, -128},
  { 1,   9, -40, -120,  240,  432,  -448, -576,  256,  256},
  {-1, -10, -50,  160,  400, -672, -1120, 1024, 1280, -512, -512},
  ...
		

References

  • CRC Standard Mathematical Tables and Formulae, 16th ed. 1996, p. 484.
  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 799.

Crossrefs

Programs

  • Mathematica
    p[ -1, x] = 0; p[0, x] = 1; p[1, x] = x + 1;
    p[k_, x_] := p[k, x] = 2*x*p[k - 1, x] - p[k - 2, x];
    w = Table[CoefficientList[p[n, x], x], {n, 0, 10}];
    An[d_] := Table[If[n == d && m  1/y)] /. 1/y -> 1, y], {d, 1, 11}] // Flatten
  • PARI
    P=List([-1,1-'x]); {A123956(n,k)=for(i=#P, n+1, listput(P, P[i-1]-2*'x*P[i])); polcoef(P[n+1],k)*(-1)^((n-k-1)\2+!k*n\2)} \\ M. F. Hasler, Nov 30 2022

Formula

From M. F. Hasler, Nov 30 2022: (Start)
a(n,0) = (-1)^(n+1), a(n,1) = (-1)^floor(n/2)*n,
a(n,2) = (-1)^floor((n+1)/2)*A007590(n) = (-1)^floor((n+1)/2)*floor(n^2 / 2),
a(n,n) = a(n,n-1) = (-2)^(n-1) (n > 0),
a(n,3) / a(n,2) = { n/3 if n odd, -4*(n+2)/n if n even },
a(n,4) / a(n,3) = n/4 if n is even. (End)
From Peter Bala, Feb 06 2025: (Start)
Let T(n, x) and U(n, x) denote the n-th Chebyshev polynomial of the first and second kind. It appears that the row g.f.'s are as follows: for n >= 0,
row 4*n+1: T(4*n+1, x) + U(4*n, x); row 4*n+2: - 2 - T(4*n+2, x) - U(4*n+1, x);
row 4*n+3: 2 + T(4*n+3, x) + U(4*n+2, x); row 4*n+4: - T(4*n+4, x) - U(4*n+3, x). (End)

Extensions

Offset changed to 0 by M. F. Hasler, Nov 30 2022