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.

A008293 Triangle of coefficients in expansion of D^n (tan x) in powers of tan x.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 8, 6, 16, 40, 24, 16, 136, 240, 120, 272, 1232, 1680, 720, 272, 3968, 12096, 13440, 5040, 7936, 56320, 129024, 120960, 40320, 7936, 176896, 814080, 1491840, 1209600, 362880, 353792, 3610112, 12207360, 18627840, 13305600, 3628800
Offset: 0

Views

Author

Keywords

Comments

James Gregory calculated the first eight rows of this table (with some numerical errors) in 1671. See Roy, p. 299. - Peter Bala, Sep 06 2016

Examples

			From _Peter Bala_, Sep 06 2016: (Start)
Table begins
    1
    1     1
    2     2
    2     8      6
   16    40     24
   16   136    240    120
  272  1232   1680    720
  272  3968  12096  13440  5040
  ...
D(tan(x)) = 1 + tan(x)^2.
D^2(tan(x)) = 2*tan(x) + 2*tan(x)^3.
D^3(tan(x)) = 2 + 8*tan(x)^2 + 6*tan(x)^4.
D^4(tan(x)) = 16*tan(x) + 40*tan(x)^3 + 24*tan(x)^5. (End)
		

Crossrefs

Cf. A008294. Other versions of same triangle: A101343, A155100.
T(n,ceiling(n/2)) gives A000142.
Bisection of column k=0 gives A000182.
Row sums give A000831.

Programs

  • Mathematica
    row[n_] := CoefficientList[ D[Tan[x], {x, n}] /. Tan -> Identity /. Sec -> Function[Sqrt[1 + #^2]], x] // DeleteCases[#, 0]&; Table[row[n], {n, 0, 10}] // Flatten // Prepend[#, 1] & (* Jean-François Alcover, Apr 05 2013 *)
    T[ n_, k_] := If[n<1, Boole[n==0 && k==1], (k-1)*T[n-1, k-1] + (k+1)*T[n-1, k+1]]; (* Michael Somos, Jul 08 2024 *)
  • PARI
    {T(n, k) = if(n<1, n==0 && k==1, (k-1)*T(n-1, k-1) + (k+1)*T(n-1, k+1))}; /* Michael Somos, Jul 08 2024 */

Formula

T(0, k) = delta(1, k), T(n, k) = (k-1)*T(n-1, k-1) + (k+1)*T(n-1, k+1).