OFFSET
1,48
COMMENTS
This coefficients appear in Euler totient function exact formula.
FORMULA
T(1, 1) = 1,
T(n, r) = 0 if r < 0 or r > n*(n+1)/2,
T(n, 0) = T(n - 1, n) if n is even,
T(n, 0) = 0 if n is odd,
T(n, r) = T(n - 1, n - r) + (-1)^n*(T(n - 1, n + r) - T(n - 1, r - n)).
EXAMPLE
sin(t) = sin(t),
2*sin(t)*sin(2*t) = cos(t)-cos(3*t),
4*sin(t)*sin(2*t)*sin(3*t) = sin(2*t)+sin(4*t)-sin(6*t),
8*sin(t)*sin(2*t)*sin(3*t)*sin(4*t) = 1-cos(6*t)-cos(8*t)+cos(10*t),
...
and corresponding table is:
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, 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
...
MAPLE
an := proc (n, r) option remember;
if n < 0 or r < 0 then
0
elif n = 1 then
if r = 1 then
1
else
0
end if;
elif r=0 and n mod 2 = 0 then
procname(n-1, n-r)
else
procname(n-1, n-r)+(-1)^n*(procname(n-1, n+r)-procname(n-1, r-n))
end if
end proc
MATHEMATICA
Table[Expand[2^(n-1)*TrigReduce[Product[Sin[k*t], {k, 1, n}]]], {n, 1, 10}]
CROSSREFS
KEYWORD
sign,tabf
AUTHOR
Gevorg Hmayakyan, Sep 18 2020
STATUS
approved