Is it possible to prove directly that this algorithm cannot be computed with bounded-memory? (From R J Lipton It seems to take $O(\log(n))$ space as an upper bound, we need a lower bound).
That would immediately imply that it wasn't periodic and hence $\pi$ is irrational.
Can this proof be done? Or maybe it depends on something difficult number theoretic result about modular exponentiation? but if it could be reduced to something like that, that would be interesting too.