I am reading a book called "Artificial Intelligence: A Modern Approach". The following sentence appears:
"It is easy to show that the agent will reach the other square in an average of two steps."
To give some context, the book is talking about a simple reflex agent. Basically the environment the agent works in is a two square environment. The agent flips a coin and if it comes up as a head it moves square and if it comes up with tails it stays where it is.
I am trying to prove the above sentence. If we let $N$ be the number of flips required to move to the other square. Then:
$$E(N) = \sum_{x=1}^{\infty}x{2^{-x}}$$
But I do not think this series converges. I have tried google but i'm getting nothing! I am not very good with probability. There is probably an easier way to think of this