Question 13
Consider the integer sequence $\{f(n)\}_{n=1}^{\infty}$ defined by:
* $f(1) = 1$.
* If $n$ is even, $f(n) = f(n/2)$.
* If $n\gt 1$ is odd and $f(n-1)$ is odd, then $f(n) = f(n-1) - 1$.
* If $n\gt 1$ is odd and $f(n-1)$ is even, then $f(n) = f(n-1) + 1$
a) Calculate $f(2^{2020} - 1)$.
b) Prove that $\{f(n)\}_{n=1}^{\infty}$ is not eventually periodic: there are no positive integers $t,n_0$ such that $f(n+t)=f(n)$ for every $n\geq n_0$.
* $f(1) = 1$.
* If $n$ is even, $f(n) = f(n/2)$.
* If $n\gt 1$ is odd and $f(n-1)$ is odd, then $f(n) = f(n-1) - 1$.
* If $n\gt 1$ is odd and $f(n-1)$ is even, then $f(n) = f(n-1) + 1$
a) Calculate $f(2^{2020} - 1)$.
b) Prove that $\{f(n)\}_{n=1}^{\infty}$ is not eventually periodic: there are no positive integers $t,n_0$ such that $f(n+t)=f(n)$ for every $n\geq n_0$.