I found the following identity in a YouTube video from 3Blue1Brown :
$$-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\frac{1}{2\cdot9}-\frac{1}{11}+\frac{1}{13} -\frac{1}{17}+\frac{1}{19}-\frac{1}{23}+\frac{1}{2\cdot25}-\frac{1}{3\cdot 27}+ \cdots = \ln\left( \frac{\pi}{4} \right).$$
As noted in the video, the identity is apparently related to the Leibniz formula for $\pi$, but I cannot find how it's derived, or even if it's true. I have searched for information, but found nothing about it. I didn't find this question in math.stackexchange neither.
I've tried similar method than the used in this problem, and also using directly the series of $\ln(x+1)$, but I have no idea of how to achieve the identity. It seems a hard problem.
Does someone knows were to find any information, or how to proceed?
Start with $$\frac{\pi}4=1-\frac13+\frac15-\cdots=\prod_{p\equiv 1 \\\mod 4}\left(\frac1{1-\frac1p}\right)\prod_{p\equiv 3 \\\mod 4}\left(\frac1{1+\frac1p}\right),$$ where $p$ ranges over primes. Here we just use the fact that every odd number can be uniquely factorised into prime powers of odd primes, together with standard geometric series identities. For the signs, we use that $n\equiv 1\mod 4$ if and only if we get an even number by summing the exponents of prime factors of $n$ congruent to $3 \mod 4$.
Take logs of both sides to get: $$\ln\left(\frac{\pi}4\right)= -\left(\sum_{p\equiv 1 \\\mod 4}\ln\left({1-\frac1p}\right)+\sum_{p\equiv 3 \\\mod 4}\ln\left({1+\frac1p}\right)\right)$$
Apply the Taylor expansion of $\ln$ about $1$: \begin{eqnarray*}\ln\left(\frac{\pi}4\right)&=& \sum_{p\equiv 1 \\\mod 4}\sum_{i=1}^\infty\frac1{ip^i}+\sum_{p\equiv 3 \\\mod 4}\sum_{i=1}^\infty\frac{(-1)^{i}}{ip^i}\\&=& \sum_{p\text{ an odd prime}} \sum_{i=1}^\infty\frac{(-1)^{\frac{p^i-1}2}}{ip^i},\end{eqnarray*} as desired.