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).
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
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.
Links
- Zak Seidov, No Need For TrigReduce
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)
Comments