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.

A135685 Triangular sequence of the coefficients of the numerator of the rational recursive sequence for tan(n*y) with x = tan(y).

Original entry on oeis.org

0, 0, 1, 0, -2, 0, -3, 0, 1, 0, 4, 0, -4, 0, 5, 0, -10, 0, 1, 0, -6, 0, 20, 0, -6, 0, -7, 0, 35, 0, -21, 0, 1, 0, 8, 0, -56, 0, 56, 0, -8, 0, 9, 0, -84, 0, 126, 0, -36, 0, 1, 0, -10, 0, 120, 0, -252, 0, 120, 0, -10, 0, -11, 0, 165, 0, -462, 0, 330, 0, -55, 0, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 17 2008

Keywords

Comments

Signed version of A034867 with interlaced zeros. - Joerg Arndt, Sep 14 2014
The negatives of these terms gives the coefficients for the numerators for when n is negative (i.e. tan(-n*y) = -tan(n*y)). - James Burling, Sep 14 2014

Examples

			Triangle starts:
  0;
  0,   1;
  0,  -2;
  0,  -3,  0,   1;
  0,   4,  0,  -4;
  0,   5,  0, -10,  0,    1;
  0,  -6,  0,  20,  0,   -6;
  0,  -7,  0,  35,  0,  -21,  0,   1;
  0,   8,  0, -56,  0,   56,  0,  -8;
  0,   9,  0, -84,  0,  126,  0, -36,  0,   1;
  0, -10,  0, 120,  0, -252,  0, 120,  0, -10;
  0, -11,  0, 165,  0, -462,  0, 330,  0, -55,  0,  1;
		

Crossrefs

Programs

  • Maple
    g[0]:= 0:
    g[1]:= x;
    for n from 2 to 20 do
    g[n]:= expand(-2*(-1)^n*g[n-1]+(x^2+1)*g[n-2])
    od:
    0, seq(seq(coeff(g[n],x,j),j=0..degree(g[n])),n=1..20); # Robert Israel, Sep 14 2014
  • Mathematica
    p[n_, x_]:= p[n, x]= If[n<2, n*x, (p[n-1, x] + x)/(1 - x*p[n-1, x])];
    Table[CoefficientList[Numerator[FullSimplify[p[n, x]]], x], {n,0,12}]//Flatten
  • Sage
    def p(n, x): return n*x if (n<2) else 2*(-1)^(n+1)*p(n-1,x) + (1+x^2)*p(n-2,x)
    def A135685(n,k): return ( p(n,x) ).series(x,n+1).list()[k]
    flatten([[A135685(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Nov 26 2021

Formula

p(n, x) = (p(n-1, x) + x)/(1 - x*p(n-1, x)), with p(0, x) = 0, p(1, x) = x.
Sum_{j} T(n,j)*x^j = g(n,x) where g(0,x) = 0, g(1,x) = x, g(n,x) = -2*(-1)^n*g(n-1,x) + (x^2+1)*g(n-2,x). - Robert Israel, Sep 14 2014

Extensions

Prepended first term and offset corrected by James Burling, Sep 14 2014