Formula for the center of gravity for overlapping cards and harmonic series reading the book "prime obsession" written by Derbyshire (Rienmann), at the beginning of the book there is an introduction to the harmonic series done using a card game.
If you have a deck of cards, you can slide the top card of 1/2 of its lenght before it falls. After that you can do the same with the second card which can be moved of 1/4 of its lenght. You can do this considering the two top cards as one entity of lenght uqual to 1 + 1/2 and the center of gravity of these two cards is at 3/4.
          --------------
    --------------
--------------
--------------
--------------
--------------

Then the next slides (from the book) are: 1/6 of the lenght of a card, 1/8, 1/10 and so on.
But in general how can you find the center of gravity for overlappling cards? Is there a general formula to do that?
The book after the first two cards says, is is easy to do the computation. I tried, but at the beginning I was simply dividing by 2 the lenght of first the three cards (1 + 1/2 + 1/4). But of course I was wrong. So, how was so simple to say the the card had to be moved of 1/6 of its lenght? What am I missing?
I am approaching the general problem analysing the balance of levers considering the extremes of the cards as if the weight were all there, trying to make an equation out of it, since the left side has to balance the right side.
          --------------
    --------------
--------------
           ^
           x

 A: This problem is solved by considering that, for a given $n^{th}$ step, we have firstly to determine the position of the center of mass of a block of $n$ cards. This is done by calculating the weighted average between the position of the preceding block, formed by $n-1$ cards, and that of the new added card. Then, we have to move the whole block rigthward until the  vertical line passing through its center of mass coincides with the right edge of the deck.
For the sake of clarity it is convenient, at a given $n^{th}$ step and immediately before we move the $n^{th}$ card, to call $d(n)$ the horizontal distance of the center of mass of our block of $n$ cards from  the left edge of our deck.

*

*Let  us start from the initial condition  where all cards are aligned. In the first step, we have to determine the maximal shifting of the first card to the right so that it does not fall. Our initial block is formed by $1$ card and its center of mass is in the middle of the deck, so that $d(1)=1/2$. The maximal rigthward shifting such that the  vertical line passing through the center of mass coincides with the right edge of the deck is then clearly $1-1/2=1/2$.


*In the second step, we have to determine the maximal shifting of the second card to the right so that it does not fall. Our block is now formed by $2$ cards and its center of mass is the weighted average between that of the preceding block and that of the new card. The preceding block has $1$ card with center of mass at a distance $1$ (since it has been already moved to the right). Thus, $d(2)=(1\cdot 1 + 1\cdot 1/2)/2=3/4$. The maximal rigthward shifting of the second card is therefore $1-3/4=1/4$.


*In the third step, we have to determine the maximal shifting of the third card to the right so that it does not fall. Our block is now formed by $3$ cards and again its center of mass is the weighted average between that of the preceding block and that of the new card. The moved preceding block has $2$ cards, with a center of mass at a distance $1$ from the left edge of the deck. Thus, $d(3)=(2\cdot 1 + 1\cdot 1/2)/3=5/6$. The maximal rigthward shifting of the second card is therefore $1-5/6=1/6$.


*Generalizing, in the $n^{th}$ step, we have to determine the maximal shifting of the $n^{th}$ card to the right so that it does not fall. Our block is formed by $n$ cards and its center of mass is the weighted average between that of the moved preceding block and that of the new card. The preceding block has $n-1$ cards with center of mass at a distance $1$. Thus
$$d(n)=\frac{(n-1)\cdot 1 + 1\cdot 1/2}{n}=\frac{(n-1/2)}{n}=\frac{2n-1}{2n}$$
The maximal rigthward shifting of the $n^{th}$ card is therefore
$$1-\frac{2n-1}{2n}=  \frac{1}{2n}$$
