$\begingroup$

This is slightly contrived, but consider a situation where you have two balls, of mass $M$ and $m$, where $M=16\times100^N\times m$ for some integer $N$. The balls are placed against a wall as shown:

We push the heavy ball towards the lighter one and the wall. The balls are assumed to collide elastically with the wall and with each other. The smaller ball bounces off the larger ball, hits the wall and bounces back. At this point there are two possible solutions: the balls collide with each other infinitely many times until the larger ball reaches the wall (assume they have no size), or the collisions from the smaller ball eventually cause the larger ball to turn around and start heading in the other direction - away from the wall.

In fact, it is the second scenario which occurs: the larger ball eventually heads away from the wall. Denote by $p(N)$ the number of collisions between the two balls before the larger one changes direction, and gaze in astonishment at the values of $p(N)$ for various $N$:

\begin{align} p(0)&=3\\ p(1)&=31\\ p(2)&=314\\ p(3)&=3141\\ p(4)&=31415\\ p(5)&=314159\\ \end{align}

and so on. $p(N)$ is the first $N+1$ digits of $\pi$!

This can be made to work in other bases in the obvious way.

See 'Playing Pool with $\pi$' by Gregory Galperin.