Self Organizing Sequence

Consider the sequence with the following properties.

The first term $$a_1$$ is any natural number.

The subsequent numbers follow the rule

$a_{n+1}=\left\{\begin{array}{lr}a_n/2 & if\ a_n\ is\ even\\ 3a_n+1 & if\ a_n\ is\ odd \end{array}\right.$

What is the value of $\lim_{n \to \infty} \frac{\sum_{i=1}^n a_i}{n}$

×