This question was asked on MathStackexchange [here](https://math.stackexchange.com/questions/1850242/x-1-2-x-n-1-x-nx-n-1-over2-what-can-we-say-bout-x-n-text), but there was no answer, so I am asking it here.


Let$$x\_1 = 2, \quad x\_{n + 1} = {{x\_n(x\_n + 1)}\over2}.$$What can we say about the behavior of $x\_n \text{ mod }2$? Is there an exact formula for $x\_n \text{ mod }2$?



$x_1 = 2$, $x_{n + 1} = {{x_n(x_n + 1)}\over2}$, what can we say about $x_n \text{ mod }2$?
As remarked by Joe Silverman, a natural way to look at this question is by phrasing it in terms of the map $f(x):=\frac{1}{2}x(x+1)$ on the $2$-adic integers $\mathbb{Z}\_2$. We are then asking about the behaviour of the orbit $f^n(2)$ with respect to the partition of $\mathbb{Z}\_2$ into two clopen sets $U\_1:=2\mathbb{Z}\_2$ and $U\_2:=1+2\mathbb{Z}\_2$. Most questions of this form are very hard, for reasons which I will attempt to explain. Short answer: dynamically, there is no obvious reason why this should be easier than the Collatz problem or the normality of $\sqrt{2}$.


Suppose that we are given a continuous transformation $f$ of a compact metric space $X$ and a partition of $X$ into finitely many sets $U\_1,\ldots,U\_N$ of reasonable regularity (e.g. such that the boundary of each $U\_i$ has empty interior). We are given a special point $x\_0$ and we want to know how often, and in what manner, the sequence $(f^n(x\_0))\_{n=1}^\infty$ visits each of the sets $U\_i$. We might believe the following result to be useful: if $\mu$ is a Borel probability measure on $X$ such that $\mu(f^{-1}A)=\mu(A)$ for every Borel measurable set $A\subset X$, and if additionally every $f$-invariant measurable set $A\subseteq X$ satisfies $\mu(A)\in \{0,1\}$, then
$$\lim\_{n\to\infty}\frac{1}{n}\sum\_{i=0}^{n-1}\phi(f^i(x)) =\int \phi\,d\mu$$
for $\mu$-almost-every initial point $x$ and every $\mu$-integrable function $\phi \colon X \to \mathbb{R}$. This is the Birkhoff ergodic theorem or pointwise ergodic theorem. In particular we could take $\phi$ to be the characteristic function of a partition element $U\_i$, so the above measures the average time spent in $U\_i$ by the sequence $f^n(x)$. Or we could take $\phi$ to be the characteristic function of a set such as $U\_1\cap f^{-1}U\_2 \cap f^{-2}U\_1$, which would tell us how often the orbit of $x$ follows the path $U\_1 \to U\_2 \to U\_1$, and so on. 


The Birkhoff theorem is great if we are content to study points $x$ which are generic with respect to a particular invariant measure. If we want to study a *specific* $x$ then we have no way to apply the theorem. If multiple different invariant measures $\mu$ exist then the integrals which they assign to the characterstic functions $\chi\_{U\_i}$ will in general be different and we will get different answers, and the Birkhoff averages along orbits will have fundamentally different behaviours depending on which measure the starting point is generic with respect to (if any). In a broad sense this is an aspect of the phenomenon called "chaos". Here is a nice example: let $X=\mathbb{R}/\mathbb{Z}$, $f(x):=2x$, let $U\_1=[0,\frac{1}{2})+\mathbb{Z}$ and $U\_2=X\setminus U\_1$. What can we say about the manner in which the trajectory $f^n(\sqrt{2})$ visits $U\_1$ and $U\_2$? For example, does the trajectory spend an equal amount of time in both sets? Put another way, is $\sqrt{2}$ normal to base $2$? Dynamical methods can tell us that Lebesgue a.e. number is normal to base $2$, but they struggle badly for *specific* numbers. The difficulty of this problem is tied quite closely to the existence of many invariant measures for this map: Lebesgue measure is invariant, but so is the Dirac measure at $0$; there are many invariant measures supported on closed $f$-invariant proper subsets corresponding to restricted digit sets (e.g. numbers where "11" is not allowed in the binary expansion) and also many fully supported invariant measures which are singular with respect to Lebesgue measure (and indeed with respect to one another). Each invariant measure contributes a set of points with its own particular, distinct dynamical behaviour, and given an arbitrary point we have no obvious way of knowing which of these different dynamical behaviours prevails.


There is only one situation in which this dynamical problem becomes easy: when a *unique* $f$-invariant Borel probability measure exists. In this case the convergence in the Birkhoff theorem is *uniform*[\*] over all $x$, and the problem of distinguishing which invariant measure (if any) characterises the behaviour of the trajectory $f^n(x)$ vanishes completely. An example would be the leading digit of $2^n$: take $X=\mathbb{R}/\mathbb{Z}$, $U\_k=[\log\_{10}k,\log\_{10}(k+1))+\mathbb{Z}$ for $k=1,\ldots,9$, $f(x):=x+\log\_{10}2$, then the leading digit of $2^n$ is $k$ if and only if $f^n(0) \in U\_k$. The irrationality of $\log\_{10} 2$ may be applied to show that Lebesgue measure is the only $f$-invariant Borel probability measure, and using the uniform ergodic theorem we can simply read off the average time spent in each $U\_k$ as the Lebesgue measure of that interval.


So how does this affect $f(x):=x(x+1)/2$ on $\mathbb{Z}\_2$? Well, $x=1$ and $x=0$ are both fixed points and carry invariant Borel probability measures $\delta\_1$ and $\delta\_0$. So the dynamical system is not uniquely ergodic, and the problem of determining which of the (presumably many) invariant measures characterises the trajectory of the initial point $2$ has no obvious solution.


[\*] to obtain uniform convergence in this case $\phi$ must be a continuous function. By upper/lower approximation we can deduce pointwise convergence to $\int \phi\,d\mu$ for all $x\in X$ in the case where $\phi$ is upper or lower semi-continuous, for example where $\phi$ is the characteristic function of a closed or open set.


