Backround:
I have been studying the peculiar function $$Q(x)=\sum_{n=1}^\infty \frac{P_n(x)}{n(2n+1)}$$ where $P_n(x)$ is the set of all polynomials with unit coefficients, defined by the binary expansion of $n$. For example $$n=57=\color{red}{111001}_2\iff P_n(x)=\color{red}{1}x^5+\color{red}{1}x^4+\color{red}{1}x^3+\color{red}{0}x^2+\color{red}{0}x^1+\color{red}{1}x^0.$$
Some properties:
This function seems intimately tied with the Euler-Mascheroni constant $\gamma$, $\pi$, and the natural logarithm. For instance, with some algebraic manipulation of some of the "easier" values of $n$, we can find that $$Q(0)=\sum_{n=0}^\infty \frac{1}{(2n+1)(2(2n+1)+1)}=\frac{1}{4}(\pi-\ln(4)),$$ as calculated by WolframAlpha, and $$Q(1)=\sum_{n=1}^\infty\frac{H(n)}{n(2n+1)}=\ln\left(\frac{4}{\pi}\right)+\gamma,$$ where $H(n)$ is the Hamming weight of the binary expansion of $n$, proven by combining some of the series expansions of $\gamma$.
Questions:
Some questions arose while playing around with this function.
Can we find other "interesting values" of $Q$, for $Q(-1)$, $Q(2)$, $Q\left(\frac{1}{2}\right)$, for example?
Can we find a closed form of $Q$, in terms of other elementary / transcendental functions? Or at the very least,
the coefficients of its power series?
My work on its power series:
When it comes to its power series
$$Q(x)=\sum_{n=0}^\infty c_n x^n,$$
using properties of binary, we can deduce that. $$c_n = \sum_{k=0}^\infty \sum_{m = 2^n} ^ {2^{n + 1} - 1} \frac{1}{(2^{n + 1} k + m)(2(2^{n + 1} k + m) + 1)}.$$ Plugging in values of $n=0,1,2$ into WolframAlpha, we find that $$c_0 = \frac{1}{4}(\pi-2\ln(2))\approx 0\approx 0.43883,$$ $$c_1 = \frac{1}{8}(\pi (2\sqrt{2}-1) - 6\ln 2)\approx 0.19816,$$ $$c_2 = \frac{1}{16}\left(\frac{\pi\left(-6-5\sqrt{2}+8\sqrt{2+\sqrt{2}}+4\sqrt{2(2+\sqrt{2})}\right)}{2+\sqrt{2}}-14\ln(2)\right)\approx 0.09301.$$ However I'm not sure what methods it used to calculate such, and if they can be used to generalize a closed form for any $c_n$. At the very least, my pattern recognition sees that $c_n$ is of the form $2^{-(n+2)}(A_n\pi - B_n \ln 2)$, with $A_n$ an algebraic number and $B_n$ a natural number.
Any and all insight would be greatly appreciated.
$\textbf{The coefficients:}$
It turns out that your conjecture about the closed form of $c_n$ is correct. Here is a derivation of an explicit closed form for $c_n$. As you have seen, the coefficients are given by
$$c_n=\sum_{k=1}^\infty\frac{a_{n,k}}{k(2k+1)}$$
where for each $n\geq 1$, $(a_{n,k})_k$ is a $2^{n+1}$-periodic sequence given by $a_{n,k}=\left\lfloor 2^{-n}k\right\rfloor\mod 2$. Letting, $\xi_n=e^{i\pi/2^n}$, we may use the discrete Fourier transform to write
$$a_{n,k}=\frac{1}{2^{n+1}}\sum_{m=0}^{2^{n+1}-1}B_{n,m}\xi_n^{mk}$$
where
\begin{equation} B_{n,m}:=\sum_{j=2^n}^{2^{n+1}-1}\xi_n^{-jm}= \begin{cases} 2^n&\text{if }m=0\\ -1+i\cot\left(\frac{m\pi}{2^{n+1}}\right)&\text{if $m$ is odd}\\ 0&\text{otherwise} \end{cases} \end{equation} We now make use of the following useful power series:
$$f(x)=\sum_{k=1}^\infty\frac{x^k}{k(2k+1)}=2-\log(1-x)-\frac{2}{\sqrt{x}}\tanh^{-1}(\sqrt{x})$$
for $|x|\leq 1$ and $x\ne 1$. We also have $f(1)=2-2\log(2)$. Through suffering and lots of miraculous cancellations, we may evaluate
\begin{equation} \mathfrak{R}[B_{n,m}f(\xi_n^m)]=-2+\log\left(2\sin\left(\frac{m\pi}{2^{n+1}}\right)\right)+\frac{m\pi}{2^{n+1}}\cot\left(\frac{m\pi}{2^{n+1}}\right)+\frac{\pi}{2}\tan\left(\frac{m\pi}{2^{n+2}}\right) \end{equation} for odd $m$. We therefore have that for $n\geq 1$,
\begin{equation} \begin{split} c_n&=\sum_{k=1}^\infty\frac{a_{n,k}}{k(2k+1)}\\ &=\frac{1}{2^{n+1}}\sum_{k=1}^\infty\frac{1}{k(2k+1)}\sum_{m=0}^{2^{n+1}-1}B_{n,m}\xi_n^{mk}\\ &=\frac{1}{2^{n+1}}\sum_{m=0}^{2^{n+1}-1}B_{n,m}\sum_{k=1}^{\infty}\frac{\xi_n^{mk}}{k(2k+1)}\\ &=\frac{1}{2^{n+1}}\sum_{m=0}^{2^{n+1}-1}B_{n,m}f(\xi_n^m)\\ &=\frac{B_{n,0}f(1)}{2^{n+1}}+\frac{1}{2^{n+1}}\sum_{m=1}^{2^{n+1}-1}\mathfrak{R}[B_{n,m}f(\xi_n^m)]\\ &=1-\log(2)+\frac{1}{2^n}\sum_{\substack{m=1\\\text{odd}}}^{2^n}\mathfrak{R}[B_{n,m}f(\xi_n^m)]\\ &=-\log(2)+\frac{1}{2^n}\sum_{\substack{m=1\\\text{odd}}}^{2^n}\left[\log\left(2\sin\left(\frac{m\pi}{2^{n+1}}\right)\right)+\frac{m\pi}{2^{n+1}}\cot\left(\frac{m\pi}{2^{n+1}}\right)+\frac{\pi}{2}\tan\left(\frac{m\pi}{2^{n+2}}\right)\right]\\ &=\left[\frac{1}{2^{n+1}}-1\right]\log(2)+\frac{\pi}{2^{n+1}}\sum_{\substack{m=1\\\text{odd}}}^{2^n}\left[\frac{m}{2^n}\cot\left(\frac{m\pi}{2^{n+1}}\right)+\tan\left(\frac{m\pi}{2^{n+2}}\right)\right]\\ \end{split} \end{equation} where the last equality is due to the finite product identity $$\sqrt{2}=\prod_{\substack{m=1\\\text{odd}}}^{2\ell}2\sin\left(\frac{m\pi}{4\ell}\right)$$
Finally, $c_0=\frac{\pi}{4}-\frac{1}{2}\log(2)$, can be calculated separately using the $5$-th line of the above chain of equalities (line $6$ uses the fact that $n\neq 0$, but line $5$ is still valid for $n=0$).
$\textbf{The analytic continuation:}$
I've been looking into producing a closed form for the analytic continuation of $Q(x)$. Though one can use the closed form for $c_n$ (along with the Taylor/Laurent expansions of tan/cot) to produce a closed form for $Q(x)$, this looks to be an unenlightening monster. However, due to a result of Gary, provided in his answer, we can cheat.
Letting $(a;q)_n$ be the $q$-Pochhammer symbol, we see that
$$(x/2;1/2)_\infty=\prod_{k=1}^\infty\left(1-\frac{x}{2^k}\right)=\sum_{n=0}^\infty\frac{(-1)^nx^n}{2^{\frac{n(n+1)}{2}}(1/2;1/2)_n}$$
has roots precisely at $2^n$ for $n\geq 1$. Gary's result tells us that $Q(x)$ admits a meromorphic continuation with simple poles at $2^n$ for $n\geq 1$, so
$$(x/2;1/2)_\infty Q(x)=\sum_{n=0}^\infty \left[\sum_{k=0}^n\frac{(-1)^kc_{n-k}}{2^{\frac{k(k+1)}{2}}(1/2;1/2)_k}\right]x^n$$
is an entire function, and the above Taylor series converges everywhere. We therefore have the closed form
$$Q(x)=\frac{1}{(x/2;1/2)_\infty}\sum_{n=0}^\infty \left[\sum_{k=0}^n\frac{(-1)^kc_{n-k}}{2^{\frac{k(k+1)}{2}}(1/2;1/2)_k}\right]x^n$$
which allows us to calculate $Q(x)$ everywhere it's defined.
$\textbf{Final thoughts:}$
Now that we have a way to evaluate the analytic continuation of $Q(x)$, I would be interested to know about the existence/structure of the roots of $Q(x)$, as well as the order of $(x/2;1/2)_\infty Q(x)$. Perhaps this is wishful thinking, but if we're very lucky, there might exist a clean Weierstrass factorization of $(x/2;1/2)_\infty Q(x)$, or a related function.