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

This page as a plain text file.
%I A286096 #29 Aug 01 2017 05:32:31
%S A286096 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,
%T A286096 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,
%U A286096 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
%N A286096 Triangle read by rows giving numerators of the Fourier expansion of cos^n(x).
%C A286096 Doubling the initial term of each line and dropping the 0's transforms this triangle to the right half of Pascal's triangle (A007318).
%C A286096 Row sums are A011782. - _Omar E. Pol_, May 02 2017
%F A286096 cos^n(x) = (1/2^(n-1)) * Sum_{k=0..n} T(n,k) * cos(k*x).
%F A286096 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.
%e A286096 Triangle begins:
%e A286096 1;
%e A286096 0,   1;
%e A286096 1,   0,   1;
%e A286096 0,   3,   0,   1;
%e A286096 3,   0,   4,   0,   1;
%e A286096 0,  10,   0,   5,   0,   1;
%e A286096 10,  0,  15,   0,   6,   0,   1;
%e A286096 0,  35,   0,  21,   0,   7,   0,   1;
%e A286096 35,  0,  56,   0,  28,   0,   8,   0,   1;
%e A286096 0, 126,   0,  84,   0,  36,   0,   9,   0,   1;
%e A286096 126, 0, 210,   0, 120,   0,  45,   0,  10,   0,   1;
%e A286096 0, 462,   0, 330,   0, 165,   0,  55,   0,  11,   0,   1;
%e A286096 462, 0, 792,   0, 495,   0, 220,   0,  66,   0,  12,   0,   1;
%e A286096 ...
%t A286096 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
%t A286096 (* Second program: *)
%t A286096 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 *)
%Y A286096 Cf. A007318, A100257 (same sequence with rows reversed).
%K A286096 nonn,tabl
%O A286096 0,8
%A A286096 _Landry Salle_, May 02 2017