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.

Showing 1-4 of 4 results.

A155100 Triangle read by rows: coefficients in polynomials P_n(u) arising from the expansion of D^(n-1) (tan x) in increasing powers of tan x for n>=1 and 1 for n=0.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 2, 0, 2, 2, 0, 8, 0, 6, 0, 16, 0, 40, 0, 24, 16, 0, 136, 0, 240, 0, 120, 0, 272, 0, 1232, 0, 1680, 0, 720, 272, 0, 3968, 0, 12096, 0, 13440, 0, 5040, 0, 7936, 0, 56320, 0, 129024, 0, 120960, 0, 40320, 7936, 0, 176896, 0, 814080, 0, 1491840
Offset: 0

Views

Author

N. J. A. Sloane, Nov 05 2009

Keywords

Comments

The definition is d^(n-1) tan x / dx^n = P_n(tan x) for n>=1 and 1 for n=0.
Interpolates between factorials and tangent numbers.
From Peter Bala, Mar 02 2011: (Start)
Companion triangles are A104035 and A185896.
A combinatorial interpretation for the polynomial P_n(t) as the generating function for a sign change statistic on certain types of signed permutation can be found in [Verges].
A signed permutation is a sequence (x_1,x_2,...,x_n) of integers such that {|x_1|,|x_2|,...,|x_n|} = {1,2,...,n}.
They form a group, the hyperoctahedral group of order 2^n*n! = A000165(n), isomorphic to the group of symmetries of the n dimensional cube.
Let x_1,...,x_n be a signed permutation and put x_0 = -(n+1) and x_(n+1) = (-1)^n*(n+1). Then x_0,x_1,...,x_n,x_(n+1) is a snake of type S(n) when x_0 < x_1 > x_2 < ... x_(n+1). For example, -5 4 -3 -1 -2 5 is a snake of type S(4).
Let sc be the number of sign changes through a snake sc = #{i, 0 <= i <= n, x_i*x_(i+1) < 0}. For example, the snake -5 4 -3 -1 -2 5 has sc = 3.
The polynomial P_(n+1)(t) is the generating function for the sign change statistic on snakes of type S(n): P_(n+1)(t) = sum {snakes in S(n)} t^sc.
See the example section below for the cases n=1 and n=2.
(End)
Equals A107729 when the first column is removed. - Georg Fischer, Jul 26 2023

Examples

			The polynomials P_{-1}(u) through P_6(u) with exponents in decreasing order:
      1
      u
      u^2 +    1
    2*u^3 +    2*u
    6*u^4 +    8*u^2 +    2
   24*u^5 +   40*u^3 +   16*u
  120*u^6 +  240*u^4 +  136*u^2 +  16
  720*u^7 + 1680*u^5 + 1232*u^3 + 272*u
  ...
Triangle begins:
  1
  0, 1
  1, 0, 1
  0, 2, 0, 2
  2, 0, 8, 0, 6
  0, 16, 0, 40, 0, 24
  16, 0, 136, 0, 240, 0, 120
  0, 272, 0, 1232, 0, 1680, 0, 720
  272, 0, 3968, 0, 12096, 0, 13440, 0, 5040
  0, 7936, 0, 56320, 0, 129024, 0, 120960, 0, 40320
  7936, 0, 176896, 0, 814080, 0, 1491840, 0, 1209600, 0, 362880
  0, 353792, 0, 3610112, 0, 12207360, 0, 18627840, 0, 13305600, 0, 3628800
  ...
From _Peter Bala_, Feb 07 2011: (Start)
Examples of sign change statistic sc on snakes of type S(n):
    Snakes     # sign changes sc  t^sc
  ===========  =================  ====
n=1:
  -2  1 -2 ........... 2 ........ t^2
  -2 -1 -2 ........... 0 ........ 1
                  yields P_2(t) = 1 + t^2;
n=2:
  -3  1 -2  3 ........ 3 ........ t^3
  -3  2  1  3 ........ 1 ........ t
  -3  2 -1  3 ........ 3 ........ t^3
  -3 -1 -2  3 ........ 1 ........ t
                  yields P_3(t) = 2*t + 2*t^3. (End)
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 287.

Crossrefs

For other versions of this triangle see A008293, A101343.
A104035 is a companion triangle.
Highest order coefficients give factorials A000142. Constant terms give tangent numbers A000182. Other coefficients: A002301.
Setting u=1 in P_n gives A000831, u=2 gives A156073, u=3 gives A156075, u=4 gives A156076, u=1/2 gives A156102.
Setting u=sqrt(2) in P_n gives A156108 and A156122; setting u=sqrt(3) gives A156103 and A000436.

Programs

  • Maple
    P:=proc(n) option remember;
    if n=-1 then RETURN(1); elif n=0 then RETURN(u); else RETURN(expand((u^2+1)*diff(P(n-1),u))); fi;
    end;
    for n from -1 to 12 do t1:=series(P(n),u,20); lprint(seriestolist(t1)); od:
    # Alternatively:
    with(PolynomialTools): seq(print(CoefficientList(`if`(i=0,1,D@@(i-1))(tan),tan)), i=0..7); # Peter Luschny, May 19 2015
  • Mathematica
    p[n_, u_] := D[Tan[x], {x, n}] /. Tan[x] -> u /. Sec[x] -> Sqrt[1 + u^2] // Expand; p[-1, u_] = 1; Flatten[ Table[ CoefficientList[ p[n, u], u], {n, -1, 9}]] (* Jean-François Alcover, Jun 28 2012 *)
    T[ n_, k_] := Which[n<0, Boole[n==-1 && k==0], n==0, Boole[k==1], True, (k-1)*T[n-1, k-1] + (k+1)*T[n-1, k+1]]; (* Michael Somos, Jul 09 2024 *)
  • PARI
    {T(n, k) = if(n<0, n==-1 && k==0, n==0, k==1, (k-1)*T(n-1, k-1) + (k+1)*T(n-1, k+1))}; /* Michael Somos, Jul 09 2024 */

Formula

If the polynomials are denoted by P_n(u), we have the recurrence P_{-1}=1, P_0 = u, P_n = (u^2+1)*dP_{n-1}/du.
G.f.: Sum_{n >= 0} P_n(u) t^n/n! = (sin t + u*cos t)/(cos t - u sin t). [Hoffman]
From Peter Bala, Feb 07 2011: (Start)
RELATION WITH BERNOULLI NUMBERS A000367 AND A002445
Put T(n,t) = P_n(i*t), where i = sqrt(-1). We have the definite integral evaluation, valid when both m and n are >=1 and m+n >= 4:
int( T(m,t)*T(n,t)/(1-t^2), t = -1..1) = (-1)^((m-n)/2)*2^(m+n-1)*Bernoulli(m+n-2).
The case m = n is equivalent to the result of [Grosset and Veselov]. The methods used there extend to the general case.
RELATION WITH OTHER ROW POLYNOMIALS
The following three identities hold for n >= 1:
P_(n+1)(t) = (1+t^2)*R(n-1,t) where R(n,t) is the n-th row polynomial of A185896.
P_(n+1)(t) = (-2*i)^n*(t-i)*R(n,-1/2+1/2*i*t), where i = sqrt(-1) and R(n,x) is an ordered Bell polynomial, that is, the n-th row polynomial of A019538.
P_(n+1)(t) = (t-i)*(t+i)^n*A(n,(t-i)/(t+i)), where {A(n,t)}n>=1 = [1,1+t,1+4*t+t^2,1+11*t+11*t^2+t^3,...] is the sequence of Eulerian polynomials - see A008292. (End)
T(n,k) = cos((n+k)*Pi/2) * Sum_{p=0..n-1} A008292(n-1,p+1) Sum_{j=0..k}(-1)^(p+j+1) * binomial(p+1,k-j) *binomial(n-p-1,j) for n>1. - Ammar Khatab, Aug 15 2024

Extensions

Name clarified by Peter Luschny, May 25 2015

A185896 Triangle of coefficients of (1/sec^2(x))*D^n(sec^2(x)) in powers of t = tan(x), where D = d/dx.

Original entry on oeis.org

1, 0, 2, 2, 0, 6, 0, 16, 0, 24, 16, 0, 120, 0, 120, 0, 272, 0, 960, 0, 720, 272, 0, 3696, 0, 8400, 0, 5040, 0, 7936, 0, 48384, 0, 80640, 0, 40320, 7936, 0, 168960, 0, 645120, 0, 846720, 0, 362880, 0, 353792, 0, 3256320, 0, 8951040, 0, 9676800, 0, 3628800
Offset: 0

Views

Author

Peter Bala, Feb 07 2011

Keywords

Comments

DEFINITION
Define polynomials R(n,t) with t = tan(x) by
... (d/dx)^n sec^2(x) = R(n,tan(x))*sec^2(x).
The first few are
... R(0,t) = 1
... R(1,t) = 2*t
... R(2,t) = 2 + 6*t^2
... R(3,t) = 16*t + 24*t^3.
This triangle shows the coefficients of R(n,t) in ascending powers of t called the tangent number triangle in [Hodges and Sukumar].
The polynomials R(n,t) form a companion polynomial sequence to Hoffman's two polynomial sequences - P(n,t) (A155100), the derivative polynomials of the tangent and Q(n,t) (A104035), the derivative polynomials of the secant. See also A008293 and A008294.
COMBINATORIAL INTERPRETATION
A combinatorial interpretation for the polynomial R(n,t) as the generating function for a sign change statistic on certain types of signed permutation can be found in [Verges].
A signed permutation is a sequence (x_1,x_2,...,x_n) of integers such that {|x_1|,|x_2|,...|x_n|} = {1,2...,n}. They form a group, the hyperoctahedral group of order 2^n*n! = A000165(n), isomorphic to the group of symmetries of the n dimensional cube.
Let x_1,...,x_n be a signed permutation.
Then 0,x_1,...,x_n,0 is a snake of type S(n;0,0) when 0 < x_1 > x_2 < ... 0.
For example, 0 4 -3 -1 -2 0 is a snake of type S(4;0,0).
Let sc be the number of sign changes through a snake
... sc = #{i, 1 <= i <= n-1, x_i*x_(i+1) < 0}.
For example, the snake 0 4 -3 -1 -2 0 has sc = 1. The polynomial R(n,t) is the generating function for the sign change statistic on snakes of type S(n+1;0,0):
... R(n,t) = sum {snakes in S(n+1;0,0)} t^sc.
See the example section below for the cases n=1 and n=2.
PRODUCTION MATRIX
Define three arrays R, L, and S as
... R = superdiag[2,3,4,...]
... L = subdiag[1,2,3,...]
... S = diag[2,4,6,...]
with the indicated sequences on the main superdiagonal, the main subdiagonal and main diagonal, respectively, and 0's elsewhere. The array R+L is the production array for this triangle: the first row of (R+L)^n produces the n-th row of the triangle.
On the vector space of complex polynomials the array R, the raising operator, represents the operator p(x) - > d/dx (x^2*p(x)), and the array L, the lowering operator, represents the differential operator d/dx - see Formula (4) below.
The three arrays satisfy the commutation relations
... [R,L] = S, [R,S] = 2*R, [L,S] = -2*L
and hence give a representation of the Lie algebra sl(2).

Examples

			Table begins
  n\k|.....0.....1.....2.....3.....4.....5.....6
  ==============================================
  0..|.....1
  1..|.....0.....2
  2..|.....2.....0.....6
  3..|.....0....16.....0....24
  4..|....16.....0...120.....0...120
  5..|.....0...272.....0...960.....0...720
  6..|...272.....0..3696.....0..8400.....0..5040
Examples of recurrence relation
  T(4,2) = 3*(T(3,1) + T(3,3)) = 3*(16 + 24) = 120;
  T(6,4) = 5*(T(5,3) + T(5,5)) = 5*(960 + 720) = 8400.
Example of integral formula (6)
... Integral_{t = -1..1} (1-t^2)*(16-120*t^2+120*t^4)*(272-3696*t^2+8400*t^4-5040*t^6) dt = 2830336/1365 = -2^13*Bernoulli(12).
Examples of sign change statistic sc on snakes of type (0,0)
= = = = = = = = = = = = = = = = = = = = = =
.....Snakes....# sign changes sc.......t^sc
= = = = = = = = = = = = = = = = = = = = = =
n=1
...0 1 -2 0...........1................t
...0 2 -1 0...........1................t
yields R(1,t) = 2*t;
n=2
...0 1 -2 3 0.........2................t^2
...0 1 -3 2 0.........2................t^2
...0 2 1 3 0..........0................1
...0 2 -1 3 0.........2................t^2
...0 2 -3 1 0.........2................t^2
...0 3 1 2 0..........0................1
...0 3 -1 2 0.........2................t^2
...0 3 -2 1 0.........2................t^2
yields
R(2,t) = 2 + 6*t^2.
		

Crossrefs

Programs

  • Maple
    R = proc(n) option remember;
    if n=0 then RETURN(1);
    else RETURN(expand(diff((u^2+1)*R(n-1), u))); fi;
    end proc;
    for n from 0 to 12 do
    t1 := series(R(n), u, 20);
    lprint(seriestolist(t1));
    od:
  • Mathematica
    Table[(-1)^(n + 1)*(-1)^((n - k)/2)*Sum[j!*StirlingS2[n + 1, j]*2^(n + 1 - j)*(-1)^(n + j - k)*Binomial[j - 1, k], {j, k + 1, n + 1}], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Jul 22 2017 *)
  • PARI
    {T(n, k) = if( n<0 || k<0 || k>n, 0, if(n==k, n!, (k+1)*(T(n-1, k-1) + T(n-1, k+1))))};
    
  • PARI
    {T(n, k) = my(A); if( n<0 || k>n, 0, A=1; for(i=1, n, A = ((1 + x^2) * A)'); polcoeff(A, k))}; /* Michael Somos, Jun 24 2017 */

Formula

GENERATING FUNCTION
E.g.f.:
(1)... F(t,z) = 1/(cos(z)-t*sin(z))^2 = Sum_{n>=0} R(n,t)*z^n/n! = 1 + (2*t)*z + (2+6*t^2)*z^2/2! + (16*t+24*t^3)*z^3/3! + ....
The e.g.f. equals the square of the e.g.f. of A104035.
Continued fraction representation for the o.g.f:
(2)... F(t,z) = 1/(1-2*t*z - 2*(1+t^2)*z^2/(1-4*t*z -...- n*(n+1)*(1+t^2)*z^2/(1-2*n*(n+1)*t*z -....
RECURRENCE RELATION
(3)... T(n,k) = (k+1)*(T(n-1,k-1) + T(n-1,k+1)).
ROW POLYNOMIALS
The polynomials R(n,t) satisfy the recurrence relation
(4)... R(n+1,t) = d/dt{(1+t^2)*R(n,t)} with R(0,t) = 1.
Let D be the derivative operator d/dt and U = t, the shift operator.
(5)... R(n,t) = (D + DUU)^n 1
RELATION WITH OTHER SEQUENCES
A) Derivative Polynomials A155100
The polynomials (1+t^2)*R(n,t) are the polynomials P_(n+2)(t) of A155100.
B) Bernoulli Numbers A000367 and A002445
Put S(n,t) = R(n,i*t), where i = sqrt(-1). We have the definite integral evaluation
(6)... Integral_{t = -1..1} (1-t^2)*S(m,t)*S(n,t) dt = (-1)^((m-n)/2)*2^(m+n+3)*Bernoulli(m+n+2).
The case m = n is equivalent to the result of [Grosset and Veselov]. The methods used there extend to the general case.
C) Zigzag Numbers A000111
(7)... R_n(1) = A000828(n+1) = 2^n*A000111(n+1).
D) Eulerian Numbers A008292
The polynomials R(n,t) are related to the Eulerian polynomials A(n,t) via
(8)... R(n,t) = (t+i)^n*A(n+1,(t-i)/(t+i))
with the inverse identity
(9)... A(n+1,t) = (-i/2)^n*(1-t)^n*R(n,i*(1+t)/(1-t)),
where {A(n,t)}n>=1 = [1,1+t,1+4*t+t^2,1+11*t+11*t^2+t^3,...] is the sequence of Eulerian polynomials and i = sqrt(-1).
E) Ordered set partitions A019538
(10)... R(n,t) = (-2*i)^n*T(n+1,x)/x,
where x = i/2*t - 1/2 and T(n,x) is the n-th row po1ynomial of A019538;
F) Miscellaneous
Column 1 is the sequence of tangent numbers - see A000182.
A000670(n+1) = (-i/2)^n*R(n,3*i).
A004123(n+2) = 2*(-i/2)^n*R(n,5*i).
A080795(n+1) =(-1)^n*(sqrt(-2))^n*R(n,sqrt(-2)). - Peter Bala, Aug 26 2011
From Leonid Bedratyuk, Aug 12 2012: (Start)
T(n,k) = (-1)^(n+1)*(-1)^((n-k)/2)*Sum_{j=k+1..n+1} j! *stirling2(n+1,j) *2^(n+1-j) *(-1)^(n+j-k) *binomial(j-1,k), see A059419.
Sum_{j=i+1..n+1}((1-(-1)^(j-i))/(2*(j-i))*(-1)^((n-j)/2)*T(n,j))=(n+1)*(-1)^((n-1-i)/2)*T(n-1,i), for n>1 and 0
G.f.: 1/G(0,t,x), where G(k,t,x) = 1 - 2*t*x - 2*k*t*x - (1+t^2)*(k+2)*(k+1)*x^2/G(k+1,t,x); (continued fraction due to T. J. Stieltjes). - Sergei N. Gladkovskii, Dec 27 2013

A008294 Triangle of coefficients in expansion of D^n (sec x) / sec x in powers of tan x.

Original entry on oeis.org

1, 1, 1, 2, 5, 6, 5, 28, 24, 61, 180, 120, 61, 662, 1320, 720, 1385, 7266, 10920, 5040, 1385, 24568, 83664, 100800, 40320, 50521, 408360, 1023120, 1028160, 362880, 50521, 1326122, 6749040, 13335840, 11491200, 3628800, 2702765, 30974526, 113760240
Offset: 0

Keywords

Crossrefs

Cf. A008293. See A104035 for another version.

Programs

  • Mathematica
    nmax = 11; t[0, 0] = 1; t[0, k_] = 0; t[n_, k_] := t[n, k] = k*t[n-1, k-1] + (k+1)*t[n-1, k+1]; Flatten[ Table[ t[n, k-1], {n, 0, nmax}, {k, Mod[n, 2]+1, n+1, 2}]] (* Jean-François Alcover, Nov 08 2011 *)

Formula

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

A101343 Triangle read by rows: nonzero coefficients of the polynomials F_n(x) which express derivatives of tan(z) in terms of powers of tan(z).

Original entry on oeis.org

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

Author

Don Knuth, Jan 28 2005

Keywords

Comments

Interpolates between factorials and tangent numbers.

Examples

			For example, D tan(z) = (tan(z))^2 + 1.
Array begins:
    1;
    1,   1;
    2,   2,
    6,   8,   2;
   24,  40,  16,
  120, 240, 136,  16;
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 2nd ed. 1998, p. 287.

Crossrefs

Reflection of triangle A008293.
Column k=0 gives A000142.
Row sums give A000831.
T(2n-1,n) gives A000182 (for n>=1).

Programs

  • Mathematica
    row[n_] := CoefficientList[ Derivative[n][Tan][z] /. Tan -> t /. Sec -> (Sqrt[1+t[#]^2]&), t[z]] // DeleteCases[#, 0]& // Reverse; Table[row[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 26 2013 *)
  • Maxima
    T(n,k):=if k=0 then Tr(n,k) else if 2*k-1=n then Tr(n,k-1) else Tr(n,k)+Tr(n,k-1);
    Tr(n,i):=((sum(binomial(j+n-2*i-1,n-2*i-1)*(j+n-2*i)!*2^(2*i-j)*(-1)^(j-i)*stirling2(n,j+n-2*i),j,0,2*i))); /* Vladimir Kruchinin, May 27 2011 */

Formula

t(n,0)=n!; t(n,k)=tr(n,k)+tr(n,k-1), k<=n/2; t(n,floor((n+1)/2)-1)=tr(n,floor((n+1)/2)-1); tr(n,i)=((sum(j=0..2*i, binomial(j+n-2*i-1,n-2*i-1)*(j+n-2*i)!*2^(2*i-j)*(-1)^(j-i)*Stirling2(n,j+n-2*i)))). - Vladimir Kruchinin, May 27 2011
From Tom Copeland, Sep 30 2015: (Start)
Reversed rows signed and aerated are generated by [(1-x^2)D]^n x with D = d/dx, so exp(t(1-x^2)D) x = tanh(t + atanh(x)) is the e.g.f. of this reversed array (see A145271).
Reversed rows unsigned and aerated are generated by [(1+x^2)D]^n x, so exp(t(1+x^2)D) x = tan(t + atan(x)) = x + (1 +x^2)*t + (2x + 2x^3)*t^2/2! + (2 + 8x^2 + 6x^4)*t^3/3! + (16x + 40x^3 + 24x^5)*t^4/4! + ... is the e.g.f. for the matrix on p. 666 of the Knuth and Buckholtz link.
E.g.f. for this entry's aerated array 1 + (1 + x^2)*t + (2 + 2x^2)*t^2/2! + (6 + 8x^2 + 2x^4)*t^3/3! + (24 + 40^x^2 + 16x^4)*t^4/4! + ... = x * tan(t*x + atan(1/x)). (End)
From Fabián Pereyra, Apr 22 2022: (Start)
T(n,k) = (n-2k)*T(n-1,k) + (n-2k+2)*T(n-1,k-1).
E.g.f.: A(x,t) = sqrt(t)*(sqrt(t)*sin(x*sqrt(t))+cos(x*sqrt(t)))/ (sqrt(t)*cos(x*sqrt(t))-sin(x*sqrt(t))). (End)

Extensions

More terms from Vladeta Jovovic and Ralf Stephan, Jan 30 2005
Showing 1-4 of 4 results.