Product of $\cos(a^kx)$ where $k=1,2,3,\ \dots$ and $a$ is a natural number I have quite frequently encountered the relation, $$\cos(x)\cos (2x)\cos(4x)\dots \cos(2^{n-1}x)= \frac{\sin(2^nx)}{2^n\sin(x)}$$but is there any explicit formula for the series, $$\cos(x)\cos (3x)\cos(9x)\dots \cos(3^{n-1}x)$$I have tried hard to come up with a relation, but in vain. If there is such a formula, I would really be interested in how to prove it, that is you can give me a hint.
 A: While there isn't a directly comparable formula, by looking at various forms of the identity you give we can find similar expressions.
The usual derivation goes through the doubling formula for $\sin x$: starting from $\sin(2x)=2\sin(x)\cos(x)$ or, put another way, $\frac{\sin(2x)}{\sin(x)}=2\cos(x)$, we can look at $\frac{\sin(4x)}{\sin(x)}=\frac{\sin(4x)}{\sin(2x)}\cdot\frac{\sin(2x)}{\sin(x)}$ $= \left(2\cos(2x)\right)\cdot\left(2\cos(x)\right)$, $\frac{\sin(8x)}{\sin(x)}=\frac{\sin(8x)}{\sin(4x)}\cdot\frac{\sin(4x)}{\sin(x)}$, etc.
Now, it turns out that $\frac{\sin(3x)}{\sin(x)}$ is also a polynomial in $\cos(x)$; specifically, if $P(t)=4t^2-1$, then $\frac{sin(3x)}{\sin(x)}=P(\cos(x))$, so we can continue expanding out in very similar ways and get the equation:
$$\frac{\sin(3^nx)}{\sin(x)}=\prod_{j=0}^{n-1}P\left(\cos(3^jx)\right)$$
In fact, it turns out that for all $k$ we have $\sin(kx)=\sin(x)\cdot P_k(\cos(x))$ for some polynomial $P_k$; specifically, $P_k$ is the Chebyshev polynomial of the second kind $U_{k-1}(t)$. This means that we can generalize the formula above as:
$$\frac{\sin(k^nx)}{\sin(x)}=\prod_{j=0}^{n-1}U_{k-1}\left(\cos(k^jx)\right)$$.
It turns out that the polynomial $U_1(x)=2x$, so the case $k=2$ is exactly the formula that you gave.
There's another angle (ahem) on the formula, too: it expresses the uniqueness of binary expansions!  To see this, let's let $z=e^{ix}$ and, for simplicity's sake, I'll write $z'=e^{-ix}=z^{-1}$. Then $\cos(x)=\frac12(z+z')$ $=z'\cdot\frac12(z^2+1)$ and $\sin(x)=\frac1{2i}(z-z')$ $=z'\cdot\frac1{2i}(z^2-1)$. Now I'll write $w=z^2$, again for convenience's sake: we can write $\sin(2^nx)=z'^{2^n}\cdot\frac1{2i}(w^{2^n}-1)$, so $\dfrac{\sin(2^nx)}{\sin(x)}=z'^{2^n-1}\dfrac{w^{2^n}-1}{w-1}$. Now, the term in $w$ on the right hand side is just the sum $\sum_{j=0}^{2^n-1}w^j=1+w+w^2+\ldots+w^{2^n-1}$. On the other hand, $2\cos(x)=z'(1+w)$, $2\cos(2x)=z'^2(1+w^2)$, etc. So the product $\prod_{j=0}^{n-1}2\cos(2^jx)$ is $\prod_{j=0}^{n-1}z'^{2^i}(1+w^{2^j})$; the product of the $z'^{2^j}$ terms is just $z'^{2^n-1}$, and what we wind up with is the identity
$$\prod_{j=0}^{n-1}\left(1+w^{2^j}\right)=\sum_{j=0}^{2^n-1}w^j=\frac{w^{2^n}-1}{w-1}$$
Now, the coefficient of $w^k$ on the left hand side of this identity is the number of ways of writing $k$ as a sum of different terms of the form $2^i$, and this identity says that this sum is $1$ for every $k$; in other words, binary expansions are unique!
We can go the other direction from this now, and try to do the same thing with ternary expansions: the generating-function version of the statement 'every number has a unique ternary expansion' is the identity $\prod_{j=0}^{n-1}(1+w^{3^j}+w^{2\cdot3^j})$ $=\sum_{j=0}^{3^n-1}w^j$ $=\dfrac{w^{3^n}-1}{w-1}$. We can think of the right hand side of this as being related to $\dfrac{\sin(3^nx)}{\sin(x)}$ and try to write the left hand side in similar fashion. Since $1+w^{3^j}+w^{2\cdot 3^j} = w^{3^j}\cdot(w^{-(3^j)}+1+w^{3^j})$, these terms should be expressible in the form $a+b\cos(2\cdot3^jx)$ for some $a$ and $b$. I'm a bit too lazy to do the algebra on this right now, but I'm 99% confident that if you go all the way through this you'll find that it's exactly equivalent to the identity in terms of the product of $P(\cos(3^jx))$ that I derived from the triplication formula above.
This formulation also suggests why there's no 'nice' formula for the product you're after: The '$w$-analog' of $\prod_{j=0}^{n-1}\cos(3^jx)$ is $\prod_{j=0}^{n-1}(1+w^{3^j})$; expanding this out into a polynomial gives $\sum_{j\in C_n}w^j$, where $C_n$ is the 'Cantor set' of numbers whose ternary expansion is at most n digits and has only zeroes and ones in it. It's (hopefully) not too surprising that there's no 'nice' way of writing this set other than that characterization.
A: For each $a > 1$, let us define $F_a$ by
$$ F_a(x) = \prod_{n=1}^{\infty} \cos(x/a^n). $$
Then we may write
$$ \cos(x)\cos(ax)\cdots\cos(a^{n-1}x) = \frac{F_a(a^n x)}{F_a(x)}. $$
So the question boils down to identifying $F_a(x)$. Unfortunately, there is a compelling evidence that $F_a(x)$ reduces to an elementary, explicit function only when $a = 2$.
Indeed, note that $F_a(x)$ can be realized as the characteristic function
$$ F_a(x) = \mathbb{E}[e^{ix S_a}] = \int_{\mathbb{R}} e^{ixu} \, \mu_{S_a}(\mathrm{d}u) $$
of the random variable $S$ defined by
$$ S_a = \sum_{n=1}^{\infty} \frac{X_n}{a^n}, $$
where $X_1, X_2, \dots$ are independent Rademacher random variables (i.e., each $X_n$ takes each of the values $\pm 1$ with probability $\frac{1}{2}$) and $\mu_{S_a}$ denotes the law of $S_a$.
When $a = 2$, $\mu_{S_2}$ becomes absolutely continuous w.r.t. the Lebesgue measure. More precisely, the law of $S_2$ becomes a uniform distribution over $[-1, 1]$, hence giving
$$ F_a(x) = \int_{-1}^{1} \frac{1}{2} e^{ixu} \, \mathrm{d}u = \frac{e^{ix} - e^{-ix}}{2ix} = \operatorname{sinc}(x). $$
On the other hand, if $ a > 2 $ then $\mu_{S_a}$ is singular continuous. (It is connected to Cantor-like sets.) Since it sounds very unlikely that the inverse Fourier transform of an elementary function produces a singular continuous measure, I believe that $F_{a}$ is not an elementary function in this case.
When $1 < a < 2$, I suspect that $\mu_{S_a}$ is absolutely continuous w.r.t. the Lebesgue measure but the density function will be fractal-like. So by a similar reasoning, I believe that $F_{a}$ is not an elementary function in this case as well.
I added probability histograms for simulations of $S_{3/2}$, $S_{2}$, and $S_{3}$ for comparison:



