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.

A210596 Triangle read by rows of coefficients of polynomials v(n,x) jointly generated with A210221; see the Formula section.

Original entry on oeis.org

1, 1, 2, 2, 2, 4, 3, 6, 4, 8, 5, 10, 16, 8, 16, 8, 20, 28, 40, 16, 32, 13, 36, 64, 72, 96, 32, 64, 21, 66, 124, 184, 176, 224, 64, 128, 34, 118, 248, 376, 496, 416, 512, 128, 256, 55, 210, 476, 808, 1056, 1280, 960, 1152, 256, 512, 89, 370, 908, 1640, 2416
Offset: 1

Views

Author

Clark Kimberling, Mar 24 2012

Keywords

Comments

Row n begins with F(n) and ends with 2^(n-1), where F = A000045 (Fibonacci numbers)
Row sums: odd-indexed Fibonacci numbers, see A001519.
For a discussion and guide to related arrays, see A208510.
Riordan array (1/(1 - z - z^2), 2*z*(1 - z)/(1 - z - z^2)). - Peter Bala, Dec 30 2015

Examples

			First five rows:
  1
  1  2
  2  2  4
  3  6  4  8
  5 10 16  8 16
First three polynomials v(n,x): 1, 1 + 2x, 2 + 2x + 4x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + 2 x*v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]   (* A210221 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]   (* A210596 *)
    With[{m = 10}, CoefficientList[CoefficientList[Series[1/((1-x-x^2) - t*2*x*(1-x)), {x, 0, m}, {t, 0, m}], x], t]]//Flatten (* G. C. Greubel, Dec 15 2018 *)
  • PARI
    {T(n,k) = if(n==1 && k==0, 1, if(n==2 && k==0, 1, if(n==2 && k==1, 2, if(k<0 || k>n-1, 0, T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - 2*T(n-2,k-1) ))))};
    for(n=1,15, for(k=0, n-1, print1(T(n,k), ", "))) \\ G. C. Greubel, Dec 15 2018
  • Python
    from sympy import Poly
    from sympy.abc import x
    def u(n, x): return 1 if n==1 else u(n - 1, x) + v(n - 1, x)
    def v(n, x): return 1 if n==1 else u(n - 1, x) + 2*x*v(n - 1, x)
    def a(n): return Poly(v(n, x), x).all_coeffs()[::-1]
    for n in range(1, 13): print (a(n)) # Indranil Ghosh, May 27 2017
    

Formula

u(n,x) = u(n-1,x) + v(n-1,x),
v(n,x) = u(n-1,x) + 2x*v(n-1,x),
where u(1,x) = 1, v(1,x) = 1.
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - 2*T(n-2,k-1), T(1,0) = T(2,0) = 1, T(2,1) = 2, T(n,k) = 0 if k<0 or if k>=n. - Philippe Deléham, Mar 25 2012
G.f.: 1/((1-x-x^2) - t*2*x*(1-x)). - G. C. Greubel, Dec 15 2018