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.

A286096 Triangle read by rows giving numerators of the Fourier expansion of cos^n(x).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 3, 0, 1, 3, 0, 4, 0, 1, 0, 10, 0, 5, 0, 1, 10, 0, 15, 0, 6, 0, 1, 0, 35, 0, 21, 0, 7, 0, 1, 35, 0, 56, 0, 28, 0, 8, 0, 1, 0, 126, 0, 84, 0, 36, 0, 9, 0, 1, 126, 0, 210, 0, 120, 0, 45, 0, 10, 0, 1, 0, 462, 0, 330, 0, 165, 0, 55, 0, 11, 0, 1, 462, 0, 792, 0, 495, 0, 220, 0, 66, 0, 12, 0, 1
Offset: 0

Views

Author

Landry Salle, May 02 2017

Keywords

Comments

Doubling the initial term of each line and dropping the 0's transforms this triangle to the right half of Pascal's triangle (A007318).
Row sums are A011782. - Omar E. Pol, May 02 2017

Examples

			Triangle begins:
1;
0,   1;
1,   0,   1;
0,   3,   0,   1;
3,   0,   4,   0,   1;
0,  10,   0,   5,   0,   1;
10,  0,  15,   0,   6,   0,   1;
0,  35,   0,  21,   0,   7,   0,   1;
35,  0,  56,   0,  28,   0,   8,   0,   1;
0, 126,   0,  84,   0,  36,   0,   9,   0,   1;
126, 0, 210,   0, 120,   0,  45,   0,  10,   0,   1;
0, 462,   0, 330,   0, 165,   0,  55,   0,  11,   0,   1;
462, 0, 792,   0, 495,   0, 220,   0,  66,   0,  12,   0,   1;
...
		

Crossrefs

Cf. A007318, A100257 (same sequence with rows reversed).

Programs

  • Mathematica
    row[n_] := If[n==0, {1}, 2^(n-1)*TrigReduce[Cos[x]^n] /. Cos[Times[k_., x]] -> x^k // CoefficientList[#, x]&]; Table[row[n], {n, 0, 12}] // Flatten
    (* Second program: *)
    T[n_, n_] = 1; T[n_, k_] /; k == n-1 || k>n = 0; T[n_, 1] := 2 T[n-1, 0] + T[n-1, 2]; T[n_, 0] := T[n-1, 1]; T[n_, k_] /; 1 < k <= n := T[n, k] = T[n-1, k-1] + T[n-1, k+1]; T[, ] = 0; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 02 2017 *)

Formula

cos^n(x) = (1/2^(n-1)) * Sum_{k=0..n} T(n,k) * cos(k*x).
T(n,k) = T(n-1,k-1) + T(n-1,k+1) if k != 1, T(n,1) = 2*T(n-1,0) + T(n-1,2), T(n,k) = 0 if k < 0 or k > n.