I found this simple infinite series of summed terms: 0/1 + 1/2 - 2/3 + 3/4 - 4/5 + 5/6 - 6/7 ....etc
When I tried calculating a bunch of terms, weirdly enough, it seems that an even number of terms produces ln(2) and an odd number of terms produces -(1-ln(2)). (You can test that out in this codepen I made)
My question is: How does this sequence produce the two numbers? Is there a certain property in it that results in this? Can a known sequence be rearranged and simplified to produce this sequence, or maybe this sequence re-written in a different form?
Thanks in advance!
Edit #1: I found that taking the known series for ln(2), substracting it from 1 and inversing addition and substraction results in this same series, which should calculate -(1-ln(2)) by definition . My question remains: How does it produce ln(2) and how does it alternate between the two?