In this post, a binary BBP-type formula for ** Fermat numbers** $F_m$ was discussed as (with a small tweak),

$$\ln(2^b+1) = \frac{b}{2^{a-1}}\sum_{n=0}^\infty\frac{1}{(2^a)^n}\left(\sum_{j=1}^{a-1}\frac{2^{a-1-j}}{an+j}+\sum_{k=1}^{a/b-1}(-1)^{k+1}\frac{2^{a-1-bk}}{an+bk}\right)\tag1$$

where $a=2^b$ and $b=2^m$.

I was then trying to find patterns for $3\cdot2^{m}+1$ and $9\cdot2^{m}+1$, but only have tentative results so far. However, it seems ** Mersenne numbers** are "easier" as,

$$\ln(2^b-1) = \frac{b}{2^{a-1}}\sum_{n=0}^\infty\frac{1}{(2^a)^n}\left(\sum_{j=1}^{a-1}\frac{2^{a-1-j}}{an+j}-\sum_{k=1}^{\lfloor a/b-1 \rfloor }\frac{2^{a-1-bk}}{an+bk}\right)\tag2$$

where $a=2^b-2$, $b$ an odd integer, and floor function $\lfloor x\rfloor$. Notice its satisfying similarity to $(1)$. For example, with $b=5$ then,

$$\ln 31 = \frac{5}{2^{29}}\sum_{n=0}^\infty\frac{1}{(2^{30})^n}\left(\sum_{j=1}^{29}\frac{2^{29-j}}{30n+j}-\sum_{k=1}^{5}\frac{2^{29-5k}}{30n+5k}\right)$$

Like $(1)$, I found $(2)$ using the integer relations algorithm of *Mathematica* (and a lot of patience and doodling).

Q:But how to rigorously prove $(2)$, and does it in fact hold forintegers $b>1$?all