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.

A273496 Triangle read by rows: coefficients in the expansion cos(x)^n = (1/2)^n * Sum_{k=0..n} T(n,k) * cos(k*x).

Original entry on oeis.org

1, 0, 2, 2, 0, 2, 0, 6, 0, 2, 6, 0, 8, 0, 2, 0, 20, 0, 10, 0, 2, 20, 0, 30, 0, 12, 0, 2, 0, 70, 0, 42, 0, 14, 0, 2, 70, 0, 112, 0, 56, 0, 16, 0, 2, 0, 252, 0, 168, 0, 72, 0, 18, 0, 2, 252, 0, 420, 0, 240, 0, 90, 0, 20, 0, 2
Offset: 0

Views

Author

Bradley Klee, May 23 2016

Keywords

Comments

These coefficients are especially useful when integrating powers of cosine x (see examples).
Nonzero, even elements of the first column are given by A000984; T(2n,0) = binomial(2n,n).
For the rational triangles for even and odd powers of cos(x) see A273167/A273168 and A244420/A244421, respectively. - Wolfdieter Lang, Jun 13 2016
Mathematica needs no TrigReduce to integrate Cos[x]^k. See link. - Zak Seidov, Jun 13 2016

Examples

			n/k|  0   1   2   3   4   5   6
-------------------------------
0  |  1
1  |  0   2
2  |  2   0   2
3  |  0   6   0   2
4  |  6   0   8   0   2
5  |  0   20  0   10  0   2
6  |  20  0   30  0   12  0   2
-------------------------------
cos(x)^4 = (1/2)^4 (6 + 8 cos(2x) + 2 cos(4x)).
I4 = Int dx cos(x)^4 = (1/2)^4 Int dx ( 6 + 8 cos(2x) + 2 cos(4x) ) = C + 3/8 x + 1/4 sin(2x) + 1/32 sin(4x).
Over range [0,2Pi], I4 = (3/4) Pi.
		

Crossrefs

Programs

  • Mathematica
    T[MaxN_] := Function[{n}, With[
           {exp = Expand[Times[ 2^n, TrigReduce[Cos[x]^n]]]},
           Prepend[Coefficient[exp, Cos[# x]] & /@ Range[1, n],
            exp /. {Cos[_] -> 0}]]][#] & /@ Range[0, MaxN];Flatten@T[10]
    (* alternate program *)
    T2[MaxN_] := Function[{n}, With[{exp = Expand[(Exp[I x] + Exp[-I x])^n]}, Prepend[2 Coefficient[exp, Exp[I # x]] & /@ Range[1, n], exp /. {Exp[] -> 0}]]][#] & /@ Range[0, MaxN]; T2[10] // ColumnForm (* _Bradley Klee, Jun 13 2016 *)

Formula

From Robert Israel, May 24 2016: (Start)
T(n,k) = 0 if n-k is odd.
T(n,0) = binomial(n,n/2) if n is even.
T(n,k) = 2*binomial(n,(n-k)/2) otherwise. (End)

A244421 Denominators of coefficient triangle for expansion of x^n in terms of polynomials Todd(k,x) = T(2*k+1, sqrt(x))/sqrt(x) (A084930), with the Chebyshev T-polynomials.

Original entry on oeis.org

1, 4, 4, 8, 16, 16, 64, 64, 64, 64, 128, 64, 64, 256, 256, 512, 512, 1024, 1024, 1024, 1024, 1024, 4096, 4096, 2048, 2048, 4096, 4096, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 32768, 8192, 8192, 16384, 16384, 8192, 8192, 65536, 65536, 131072, 131072, 65536, 65536, 65536, 65536, 262144, 262144, 262144, 262144, 262144, 524288, 524288, 131072, 131072, 1048576, 1048576, 524288, 524288, 1048576, 1048576
Offset: 0

Views

Author

Wolfdieter Lang, Aug 04 2014

Keywords

Comments

For the numerator triangle see A244420, also for comments, and the rational entries R(n,m) of the lower triangular Riordan matrix denoted in standard fashion by ((2 - c(z/4))/(1-z), -1 + c(z/4)) with c the o.g.f. of the Catalan numbers A000108.

Examples

			The triangle a(n,m) begins:
  n\m   0     1     2     3     4     5     6 ...
  0:    1
  1:    4     4
  2:    8    16    16
  3:   64    64    64    64
  4:  128    64    64   256   256
  5:  512   512  1024  1024  1024  1024
  6: 1024  4096  4096  2048  2048  4096  4096
  ...
For more rows see the link.
For the rational triangle R(n,m) see the example section of A244420.
Expansion: x^3 = (35*Todd(0, x) + 21*Todd(1, x) + 7*Todd(2, x) + 1*Todd(3, x))/64 = (35 + 21*(-3+4*x) + 7*( 5-20*x+16*x^2) + (-7+56*x-112*x^2+64*x^3))/64. For the Todd polynomials see A084930.
		

Crossrefs

Formula

a(n,m) = denominator(R(n,m)) with the rationals Riordan matrix elements R(n,m)= [x^m]R(n,x), with the row polynomials R(n,x) generated by ((2 - c(z/4))/(1-z))/(1 - x*(-1 + c(z/4))) = 2*((1+x)*(z-1) + (1-x)*sqrt(1-z))/((1-z)*((1+x)^2*z - 4*x)), where c(x) is the o.g.f. of the Catalan numbers A000108.

A273167 Numerators of coefficient triangle for expansion of x^(2*n) in terms of Chebyshev polynomials of the first kind T(2*m, x) (A127674).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 5, 15, 3, 1, 35, 7, 7, 1, 1, 63, 105, 15, 45, 5, 1, 231, 99, 495, 55, 33, 3, 1, 429, 3003, 1001, 1001, 91, 91, 7, 1, 6435, 715, 1001, 273, 455, 35, 15, 1, 1, 12155, 21879, 1989, 4641, 1071, 765, 51, 153, 9, 1, 46189, 20995, 62985, 4845, 4845, 969, 4845, 285, 95, 5, 1
Offset: 0

Views

Author

Wolfdieter Lang, Jun 12 2016

Keywords

Comments

The denominator triangle is given in A273168.
The expansion is x^(2*n) = Sum_{m=0..n} R(n, m)*Tnx(2*m, x), n >= 0, with the rational triangle R(n, m) = a(n, m)/A273168(n, m).
Compare this with A127673.
This is equivalent to the expansion cos(x)^(2n) = Sum_{m=0..n} R(n, m)*cos(2*m*x), n >= 0. Compare this with the even numbered rows of A273496.
See A244420/A244421 for the expansion of x^(2*n+1) in terms of odd-indexed Chebyshev polynomials of the first kind.
The signed rational triangle S(n, m) = R(n, m) * (-1)^m appears in the expansion sin(x)^(2n) = Sum_{m=0..n} S(n, m) * cos(2*m*x), n >= 0. This is equivalent to the identity (1-x^2)^n = Sum_{m=0..n} S(n, m) * T(2*m, x).

Examples

			The triangle a(n, m) begins:
n\m     0     1    2    3    4   5  6   7 8 9
0:      1
1:      1     1
2:      3     1    1
3:      5    15    3    1
4:     35     7    7    1    1
5:     63   105   15   45    5   1
6:    231    99  495   55   33   3  1
7:    429  3003 1001 1001   91  91  7   1
8:   6435   715 1001  273  455  35 15   1 1
9:  12155 21879 1989 4641 1071 765 51 153 9 1
...
The rational triangle R(n, m) begins:
n\m  0       1      2     3      4     5  ...
0:   1
1:  1/2     1/2
2:  3/8     1/2    1/8
3:  5/16   15/32   3/16  1/32
4: 35/128   7/16   7/32  1/16  1/128
5: 63/256 105/256 15/64 45/512 5/256 1/512
...
row 6: 231/1024 99/256 495/2048 55/512 33/1024 3/512 1/2048,
row 7: 429/2048 3003/8192 1001/4096 1001/8192 91/2048 91/8192 7/4096 1/8192,
row 8: 6435/32768 715/2048 1001/4096 273/2048 455/8192 35/2048 15/4096 1/2048 1/32768,
row 9: 12155/65536 21879/65536 1989/8192 4641/32768 1071/16384 765/32768 51/8192 153/131072 9/65536 1/131072,
...
n=3: x^6 = (5/16)*T(0, x) + (15/32)*T(2, x)
  +(3/16)*T(4, x) + (1/32)*T(6,x).
  cos^6(x) = (5/16) + (15/32)*cos(2*x) +
    (3/16)*cos(4*x) + (1/32)*cos(6*x).
  sin^6(x) = (5/16) - (15/32)*cos(2*x) +
    (3/16)*cos(4*x) - (1/32)*cos(6*x).
		

Crossrefs

Programs

  • Mathematica
    T[MaxN_] := Function[{n}, With[{exp = Expand[(1/2)^(2 n) (Exp[I x] + Exp[-I x])^(2 n)]}, Prepend[ 2 Coefficient[exp, Exp[I 2 # x]] & /@ Range[1, n], exp /. {Exp[_] -> 0}]]][#] & /@ Range[0, MaxN];
    T[5] // ColumnForm
    T2[MaxN_] := Table[Inverse[Outer[Coefficient[#1, x, #2] &, Prepend[ChebyshevT[#, x] & /@ Range[2 MaxN], 1], Range[0, 2 MaxN]]][[n, m]], {n, 1, 2 MaxN, 2}, {m, 1, n, 2}]
    T2[6] // ColumnForm (* Bradley Klee, Jun 14 2016 *)
  • PARI
    a(n, m) = if (m == 0, numerator((1/2^(2*n-1)) * binomial(2*n,n)/2), numerator((1/2^(2*n-1))*binomial(2*n, n-m)));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(a(n,k), ", ")); print()); \\ Michel Marcus, Jun 19 2016

Formula

a(n, m) = numerator(R(n, m)), n >= 0, m = 1, ..., n, with the rationals R(n, m) given by R(n, 0) = (1/2^(2*n-1))*binomial(2*n,n)/2 and R(n ,m) = (1/2^(2*n-1))*binomial(2*n, n-m) for m =1..n, n >= 0.

A273171 Triangle for numerators of coefficients for integrated odd powers of cos(x) in terms sin((2*m+1)*x).

Original entry on oeis.org

1, 3, 1, 5, 5, 1, 35, 7, 7, 1, 63, 7, 9, 9, 1, 231, 55, 33, 55, 11, 1, 429, 429, 143, 143, 13, 13, 1, 6435, 5005, 3003, 195, 455, 105, 15, 1, 12155, 2431, 1547, 221, 595, 85, 17, 17, 1, 46189, 12597, 12597, 969, 323, 969, 969, 57, 19, 1, 88179, 146965, 20349, 14535, 2261, 20349, 5985, 133, 105, 21, 1
Offset: 0

Views

Author

Wolfdieter Lang, Jun 13 2016

Keywords

Comments

The triangle for the denominators is given in A273172.
Int(cos^(2*n+1)(x), x) = Sum_{m = 0..n} R(n, m)*sin((2*m+1)*x), n >= 0, with the rational triangle a(n, m)/A273172(n, m).
For the rational triangle for the odd powers of cos see A244420/A244421. See also the odd-indexed rows of A273496.
The signed rational triangle S(n, m) = R(n, m)*(-1)^(m+1) appears in the formula
Int(sin^(2*n+1)(x), x) = Sum_{m = 0..n} S(n, m)*cos((2*m+1)*x), n >= 0,

Examples

			The triangle a(n, m) begins:
n\m    0     1     2   3   4   5   6  7  8 9
0:     1
1:     3     1
2:     5     5     1
3:    35     7     7   1
4:    63     7     9   9  1
5:   231    55    33  55  11   1
6:   429   429   143 143  13  13   1
7:  6435  5005  3003 195 455 105  15  1
8: 12155  2431  1547 221 595  85  17 17  1
9: 46189 12597 12597 969 323 969 969 57 19 1
...
row 10: 88179 146965 20349 14535 2261 20349 5985 133 105 21 1,
...
The rational triangle R(n, m) begins:
n\m   0    1     2    3      4     ...
0:   1/1
1:   3/4  1/12
2:   5/8  5/48 1/80
3:  35/64 7/64 7/320 1/448
4: 63/128 7/64 9/320 9/1792 1/2304
...
row 5: 231/512 55/512 33/1024 55/7168 11/9216 1/11264,
row 6: 429/1024 429/4096 143/4096 143/14336 13/6144 13/45056 1/53248,
row 7: 6435/16384 5005/49152 3003/81920 195/16384 455/147456 105/180224 15/212992 1/245760,
row 8: 12155/32768 2431/24576 1547/40960 221/16384 595/147456 85/90112 17/106496 17/983040 1/1114112,
row 9: 46189/131072 12597/131072 12597/327680 969/65536 323/65536 969/720896 969/3407872 57/1310720 19/4456448 1/4980736,
row 10: 88179/262144 146965/1572864 20349/524288 14535/917504 2261/393216 20349/11534336 5985/13631488 133/1572864 105/8912896 21/19922944 1/22020096.
...
n = 3: Int(cos^7(x), x) = (35/64)*sin(x) + (7/64)*sin(3*x) + (7/320)*sin(5*x) + (1/448)*sin(7*x). Gradstein-Rhyshik, p. 169, 2.513 16.
  Int(sin^7(x), x) = -(35/64)*cos(x) + (7/64)*cos(3*x) - (7/320)*cos(5*x) + (1/448)*cos(7*x). Gradstein-Rhyshik, p. 169, 2.513 10.
		

References

  • I. S. Gradstein and I. M. Ryshik, Tables of series, products , and integrals, Volume 1, Verlag Harri Deutsch, 1981, pp. 168-169, 2.513 1 and 4.

Crossrefs

Programs

  • Mathematica
    T[MaxN_] :=   Function[{n}, With[{exp =  Expand[(1/2)^(2 n + 1) (Exp[I x] + Exp[-I x])^(2 n + 1)]},  2/(2 # + 1) Coefficient[exp, Exp[I (2 # + 1) x]] & /@  Range[0, n]]][#] & /@ Range[0, MaxN];
    T[5] // ColumnForm (* Bradley Klee, Jun 14 2016 *)
  • PARI
    a(n, m) = numerator((1/2^(2*n))*binomial(2*n+1, n-m)/(2*m+1));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(a(n,k), ", ")); print()); \\ Michel Marcus, Jun 19 2016

Formula

a(n, m) = numerator(R(n, m)) with the rationals R(n, m) = (1/2^(2*n)) * binomial(2*n+1, n-m)/(2*m+1) for m = 0, ..., n, n >= 0. See the Gradstein-Ryshik reference (where the sin arguments are falling).
Showing 1-4 of 4 results.