%I #21 Sep 21 2020 04:58:08
%S 0,1,0,1,0,-1,0,0,1,0,1,0,-1,1,0,0,0,0,0,-1,0,-1,0,1,0,1,0,1,0,1,0,0,
%T 0,0,0,-1,0,-1,0,1,0,1,0,1,0,0,0,-2,0,0,0,-1,0,0,0,0,0,1,0,1,0,-1,0,0,
%U 0,0,2,0,1,0,1,0,0,0,-1,0,-1,0,0,0,-1,0,0
%N Irregular triangle where T(n,k) are the coefficients of expansion 2^(n-1) Product_{k=1..n} sin(k*t) = Sum_{k=1..n*(n+1)/2} T(n,k)*cos(k*t) for even n and 2^(n-1) Product_{k=1..n} sin(k*t) = Sum_{k=1..n*(n+1)/2} T(n,k)*sin(k*t) for odd n.
%C This coefficients appear in Euler totient function exact formula.
%F T(1, 1) = 1,
%F T(n, r) = 0 if r < 0 or r > n*(n+1)/2,
%F T(n, 0) = T(n - 1, n) if n is even,
%F T(n, 0) = 0 if n is odd,
%F T(n, r) = T(n - 1, n - r) + (-1)^n*(T(n - 1, n + r) - T(n - 1, r - n)).
%e sin(t) = sin(t),
%e 2*sin(t)*sin(2*t) = cos(t)-cos(3*t),
%e 4*sin(t)*sin(2*t)*sin(3*t) = sin(2*t)+sin(4*t)-sin(6*t),
%e 8*sin(t)*sin(2*t)*sin(3*t)*sin(4*t) = 1-cos(6*t)-cos(8*t)+cos(10*t),
%e ...
%e and corresponding table is:
%e 0, 1
%e 0, 1, 0, -1
%e 0, 0, 1, 0, 1, 0, -1
%e 1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 1
%e 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 1
%e 0, 1, 0, 1, 0, 0, 0, -2, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 1, 0, -1
%e ...
%p an := proc (n, r) option remember;
%p if n < 0 or r < 0 then
%p 0
%p elif n = 1 then
%p if r = 1 then
%p 1
%p else
%p 0
%p end if;
%p elif r=0 and n mod 2 = 0 then
%p procname(n-1, n-r)
%p else
%p procname(n-1, n-r)+(-1)^n*(procname(n-1, n+r)-procname(n-1, r-n))
%p end if
%p end proc
%t Table[Expand[2^(n-1)*TrigReduce[Product[Sin[k*t],{k,1,n}]]],{n,1,10}]
%K sign,tabf
%O 1,48
%A _Gevorg Hmayakyan_, Sep 18 2020