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.

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

This page as a plain text file.
%I A273496 #35 Aug 27 2018 10:15:53
%S A273496 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,
%T A273496 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,
%U A273496 420,0,240,0,90,0,20,0,2
%N 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).
%C A273496 These coefficients are especially useful when integrating powers of cosine x (see examples).
%C A273496 Nonzero, even elements of the first column are given by A000984; T(2n,0) = binomial(2n,n).
%C A273496 For the rational triangles for even and odd powers of cos(x) see A273167/A273168 and A244420/A244421, respectively. - _Wolfdieter Lang_, Jun 13 2016
%C A273496 Mathematica needs no TrigReduce to integrate Cos[x]^k. See link. - _Zak Seidov_, Jun 13 2016
%H A273496 Zak Seidov, <a href="/A273496/a273496.pdf">No Need For TrigReduce</a>
%F A273496 From _Robert Israel_, May 24 2016: (Start)
%F A273496 T(n,k) = 0 if n-k is odd.
%F A273496 T(n,0) = binomial(n,n/2) if n is even.
%F A273496 T(n,k) = 2*binomial(n,(n-k)/2) otherwise. (End)
%e A273496 n/k|  0   1   2   3   4   5   6
%e A273496 -------------------------------
%e A273496 0  |  1
%e A273496 1  |  0   2
%e A273496 2  |  2   0   2
%e A273496 3  |  0   6   0   2
%e A273496 4  |  6   0   8   0   2
%e A273496 5  |  0   20  0   10  0   2
%e A273496 6  |  20  0   30  0   12  0   2
%e A273496 -------------------------------
%e A273496 cos(x)^4 = (1/2)^4 (6 + 8 cos(2x) + 2 cos(4x)).
%e A273496 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).
%e A273496 Over range [0,2Pi], I4 = (3/4) Pi.
%t A273496 T[MaxN_] := Function[{n}, With[
%t A273496        {exp = Expand[Times[ 2^n, TrigReduce[Cos[x]^n]]]},
%t A273496        Prepend[Coefficient[exp, Cos[# x]] & /@ Range[1, n],
%t A273496         exp /. {Cos[_] -> 0}]]][#] & /@ Range[0, MaxN];Flatten@T[10]
%t A273496 (* alternate program *)
%t A273496 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 *)
%Y A273496 Cf. A000984, A001790, A046161, A038533, A038534, A273506, A273507, A273167, A273168, A244420, A244421.
%K A273496 nonn,tabl
%O A273496 0,3
%A A273496 _Bradley Klee_, May 23 2016