Is it known that $\sum_{i=1}^\infty \frac{if\;(i \pmod n=0)\;then\;(1-n)\;else\;(1)}{i}=log(n)$? I found this general infinite sum:
$\sum_{i=1}^\infty \frac{ \mathtt i \mathtt f \;   (i \pmod n = 0) \; \mathtt t \mathtt h \mathtt e \mathtt n \;(1-n) \; \mathtt e \mathtt l \mathtt s \mathtt e \; (1)}{i} = log(n)$
Sample with n = 2:
log(2) = 1 - $\frac{1}{2}$ + $\frac{1}{3}$ - $\frac{1}{4}$ + $\frac{1}{5}$ - $\frac{1}{6}$ + $\frac{1}{7}$ - ... 
(the minus are given at (i MOD 2)=0 --> (1 minus 2) = -1)
Sample with n = 3:
log(3) = 1 + $\frac{1}{2}$ - $\frac{2}{3}$ + $\frac{1}{4}$ + $\frac{1}{5}$ - $\frac{2}{6}$ + $\frac{1}{7}$ +  $\frac{1}{8}$ - $\frac{2}{9}$ + ...
(the minus are given at (i MOD 3)=0 --> (1 minus 3) = -2)
and so on.
Is this formula already known?
Can that be proven?
Thanks in advance.

You have to start with partial sums. Choose some $M$ to get:
$$
S_M = \sum_{i=1}^{nM} \frac{if\;(i \pmod n=0)\;then\;(1-n)\;else\;(1)}{i}= \sum_{i=1}^{nM} \frac1i - n \sum_{i=1}^M \frac1{n i} = \sum_{i=1}^{nM} \frac1i -  \sum_{i=1}^M \frac1{i}
$$
Now observe the well-known limit (see here) $\lim_{k \to \infty}\sum_{i=1}^k \frac1{i} = \ln(k) + \gamma$, where $\gamma$ is the Euler–Mascheroni constant.
This gives 
$$
S = \lim_{M \to \infty} S_M = \ln(nM) + \gamma - (\ln(M) + \gamma) = \ln(n)
$$
