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-3 of 3 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)

A273168 Denominators 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, 2, 2, 8, 2, 8, 16, 32, 16, 32, 128, 16, 32, 16, 128, 256, 256, 64, 512, 256, 512, 1024, 256, 2048, 512, 1024, 512, 2048, 2048, 8192, 4096, 8192, 2048, 8192, 4096, 8192, 32768, 2048, 4096, 2048, 8192, 2048, 4096, 2048, 32768, 65536, 65536, 8192, 32768, 16384, 32768, 8192, 131072, 65536, 131072, 262144, 65536, 262144, 32768, 65536, 32768, 524288, 131072, 262144, 131072, 524288
Offset: 0

Views

Author

Wolfdieter Lang, Jun 12 2016

Keywords

Comments

The numerator sequence is given in A273167, where details are given.

Examples

			The triangle a(n, m) begins:
n\m     0    1    2    3    4    5    6    7
0:      1
1:      2    2
2:      8    2    8
3:     16   32   16   32
4:    128   16   32   16  128
5:    256  256   64  512  256  512
6:   1024  256 2048  512 1024  512 2048
7:   2048 8192 4096 8192 2048 8192 4096 8192
...
row 8: 32768 2048 4096 2048 8192 2048 4096 2048 32768,
row 9: 65536 65536 8192 32768 16384 32768 8192 131072 65536 131072,
...
		

Crossrefs

Cf. A273167.

Programs

  • PARI
    a(n, m) = if (m == 0, denominator((1/2^(2*n-1)) * binomial(2*n,n)/2), denominator((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) = denominator(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.

A273169 Numerators of coefficient triangle for integrated even powers of cos(x) in terms of x and sin(2*m*x).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Jun 13 2016

Keywords

Comments

The denominator triangle is given in A273170.
Int(cos^(2*n)(x), x) = R(n, 0)*x + Sum_{m = 1..n} R(n, m)*sin(2*m*x), n >= 0, with the rational triangle a(n, m)/A273170(n, m).
For the rational triangle for the even powers of cos see A273167/A273168. See also the even-indexed rows of A273496.
For the integral over odd powers of cos see the rational triangle A273171/A273172.
The signed triangle S(n, m) = R(n, m)*(-1)^m appears in the integral of even powers of sin as Int(sin^(2*n)(x), x) = S(n , 0)*x + Sum_{m = 1..n} S(n, m)*sin(2*m*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:     1     1
2:     3     1    1
3:     5    15    3    1
4:    35     7    7    1    1
5:    63   105   15   15    5   1
6:   231    99  495   55   33   3  1
7:   429  3003 1001 1001   91  91  7   1
8:  6435   715 1001   91  455   7  5   1 1
9: 12155 21879 1989 1547 1071 153 17 153 9 1
...
row 10: 46189 20995 62985 1615 4845 969 1615 285 95 5 1,
...
The rational triangle R(n, m) begins:
n\m   0      1     2      3      4     ...
0:   1/1
1:   1/2    1/4
2:   3/8    1/4   1/32
3:   5/16  15/64  3/64   1/192
4:  35/128  7/32  7/128  1/96  1/1024
...
row 5: 63/256 105/512 15/256 15/1024 5/2048 1/5120,
row 6: 231/1024 99/512 495/8192 55/3072 33/8192 3/5120 1/24576,
row 7: 429/2048 3003/16384 1001/16384 1001/49152 91/16384 91/81920 7/49152 1/114688,
row 8: 6435/32768 715/4096 1001/16384 91/4096 455/65536 7/4096 5/16384 1/28672 1/524288,
row 9: 12155/65536 21879/131072 1989/32768 1547/65536 1071/131072 153/65536 17/32768 153/1835008 9/1048576 1/2359296,
row 10: 46189/262144 20995/131072 62985/1048576 1615/65536 4845/524288 969/327680 1615/2097152 285/1835008 95/4194304 5/2359296 1/10485760,
...
n = 3: Int(cos^6(x), x) = (5/16)*x + (15/64)*sin(2*x) + (3/64)*sin(4*x) + (1/192)*sin(6*x).
  Int(sin^6(x), x) = (5/16)*x - (15/64)*sin(2*x) + (3/64)*sin(4*x) - (1/192)*sin(6*x).
		

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 3.

Crossrefs

Programs

  • Mathematica
    T[MaxN_] := Function[{n}, With[{exp = Expand[(1/2)^(2 n) (Exp[I x] + Exp[-I x])^(2 n)]}, Prepend[1/# Coefficient[exp, Exp[I 2 # x]] & /@ Range[1, n], exp /. {Exp[_] -> 0}]]][#] & /@ Range[0, MaxN];
    T[5] // ColumnForm (* Bradley Klee, Jun 14 2016 *)
  • PARI
    a(n, m) = if (m == 0, numerator((1/2^(2*n))*binomial(2*n,n)), numerator((1/2^(2*n))*binomial(2*n, n-m)/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)) with the rationals R(n, m) defined by R(n, 0) = (1/2^(2*n))*binomial(2*n,n) and R(n, m) = (1/2^(2*n))*binomial(2*n, n-m)/m for m = 1, ..., n, n >= 0. See the Gradstein-Ryshik reference (where the sin arguments are falling).
Showing 1-3 of 3 results.