2

Suppose $b_n$ is the frequency number of "1" in the $(n)_2$ base=2

for example

$b(2)=b(10)_2=1\\b(7)=b(111)_2=3\\b(6)=b(110)_2=2$
now find $$\exp\left(\lim_{k \to \infty}\sum_{n=1}^{k}\frac{b_n}{n(n+1)} \right)$$ I get stuck with $\sum_{n=1}^{k}\frac{b_n}{n(n+1)}$
Remark: The original question asked for $\exp(\sum_{n=1}^{\infty}\frac{b_n}{n(n+1)}) $is $\in \mathbb{Q}$ or not ?

achille hui
  • 122,701
Khosrotash
  • 24,922
  • It's immediately obvious that $b(x) \leq \log n$ for $1 \leq x \leq {10}^n$ so it looks like you want to relate that to $\ln$. – postmortes Aug 18 '17 at 12:18
  • BTW, $b_n=b(n)<\log_2 n$, so the series converges without any doubt, you can simply write $$\exp\left(\sum_{n=1}^{\infty}\frac{b_n}{n(n+1)}\right).$$ –  Aug 18 '17 at 12:24
  • Numerical results suggest that it is pretty much rational, even an integer (no, not 42, just 4). –  Aug 18 '17 at 12:33
  • For a reference see B5 Putnam 1981 https://mks.mff.cuni.cz/kalva/putnam/putn81.html – clark Aug 18 '17 at 16:22

2 Answers2

6

With some handwaving, we can justify the number equals to $4$.

For $|x| < 1$ and $|t| \le 1$, we have

$$\prod_{k=0}^\infty (1 + tx^{2^k}) = \sum_{n=0}^\infty t^{b_n}x^n $$ This suggests for $|x| < 1$, the OGF for the sequence $b_n$ satisfy following relation:

$$\begin{align} \sum_{n=0}^\infty b_n x^n &= \lim_{t\to 1-} t\frac{\partial}{\partial t}\left[\sum_{n=0}^\infty t^{b_n}x^n \right] = \lim_{t\to 1-} t\frac{\partial}{\partial t}\left[ \prod_{k=0}^\infty (1 + tx^{2^k}) \right]\\ &= \lim_{t\to 1-}\left\{ \left(\sum_{k=0}^\infty \frac{tx^{2^k}}{1 + tx^{2^k}}\right) \prod_{k=0}^\infty(1 + tx^{2^k})\right\}\\ &= \frac{1}{1-x}\sum_{k=0}^\infty \frac{x^{2^k}}{1 + x^{2^2}} \end{align} $$ Notice $b_0 = 0$ and $\displaystyle\;\frac{1}{n(n+1)} = \frac{1}{n} - \frac{1}{n-1} = \int_0^1 \frac{1-x}{x}x^n dx\;$ for $n \ge 1$.

We find

$$\sum_{n=1}^\infty \frac{b_n}{n(n+1)} = \int_0^1 \sum_{k=0}^\infty \frac{x^{2^k-1}}{1+x^{2^k}}dx = \sum_{k=0}^\infty \frac{1}{2^k}\left[\log(1+x^{2^k})\right]_0^1 = \sum_{k=0}^\infty \frac{\log 2}{2^k} = \log 4\\ \implies \exp\left(\sum_{n=1}^\infty \frac{b_n}{n(n+1)}\right) = 4 $$

Update

After I finished this answer, I have a déjà vu feeling I have seen this before. It turns out I have answered a similar question four years ago! See this for a more rigorous way in evaluating the sum.

achille hui
  • 122,701
  • 2
    Funnily, you have already answered the question $\exp\left(\lim_{k \to \infty}\sum_{n=1}^{k}\frac{b_n}{n(n+1)} \right)$ years ago. – Surb Aug 18 '17 at 16:36
  • There's not really much handwaving, that's all easily justified, and your derivation of a generating function for $b_n$ is nice. I like it. –  Aug 18 '17 at 16:42
4

Well, I have a solution closer to binary representations of integers. First, let's transform the series: partial summation gives $$\sum^N_{n=1}\frac{b_n}{n(n+1)}=\sum^N_{n=1}\frac{b_n-b_{n-1}}{n}-\frac{b_N}{N+1}.$$ Since $b_n=O(\log n)$, the last term converges to $0$ as $N\rightarrow\infty,$ so with $d_n=b_n-b_{n-1},$ $$s(N)=\sum^N_{n=1}\frac{d_n}{n}$$ has the same limit as our sum. We can analyze $d_n$ easily: if the binary representation of $n$ ends with a group of one $1$ and $m$ trailing $0$s, subtracting $1$ will change that to one zero and $m$ trailing $1$s, so $d_n=1-m$. We can write that in recursive form: $d_{2n}=d_n-1$ and $d_{2n-1}=1.$ Now let's calculate $s(2N)$, grouping by odd and even summands: $$s(2N)=\sum^N_{n=1}\frac{d_{2n-1}}{2n-1}+\sum^N_{n=1}\frac{d_{2n}}{2n}=\sum^N_{n=1}\frac1{2n-1}+\frac12\sum^N_{n=1}\frac{d_{n}-1}{n}.$$ With the standard notation $$H_n=\sum^n_{k=1}\frac1k,$$ we can write $$\sum^N_{n=1}\frac1{2n-1}=\sum^{2N}_{n=1}\frac1n-\sum^N_{n=1}\frac1{2n}=H_{2N}-\frac12 H_N,$$ so we have $$s(2N)=H_{2N}-\frac12 H_N+\frac12 s(N)-\frac12 H_N=\frac12 s(N)+H_{2N}-H_N.$$ Now we know that $H_n=\ln n+\gamma+o(1/n)$, so $\lim_{N\rightarrow\infty}(H_{2N}-H_N)=\ln 2,$ and $s=\lim_{N\rightarrow\infty}s(N)$ exists, meaning $s=\frac12 s+\ln 2$, i.e. $s=2\,\ln 2,$ and $$\exp(s)=e^{2\ln 2}=4.$$ BTW, $$\exp(s(10^9))=3.9999999871537977,$$ while $$\exp\left(\sum^{10^9}_{n=1}\frac{b_n}{n(n+1)}\right)=3.9999999351537974.$$