Does a recursive function with infinite domain and a finite range have to be periodic?

239 Views Asked by At

I think the answer is yes, but I'm unsure of how to make a rigorous argument. One of the key things that I can think of is the fact that since that map is from infinite to finite at least one of the outputs has to have infinitely many inputs that map to it, meaning that it can't have an inverse. But I'm unsure where to go with that information.

EDIT: To clarify what I mean by recursive function here is this. What I mean, is a set of values $a_n$ for positive integers $n$ defined such that $a_n=f(a_{n-1})$ and $a_0$ equals some constant $c$. My question then is there a function $g$ such the set $g(a_n)$ is infinite, but the set $a_n$ is finite.

1

There are 1 best solutions below

0
On

Let $a_k$, $\>k\geq-1$, be the decimal places of $$\sqrt{2}=1.414\ldots=\sum_{k=-1}^\infty a_k\,10^{-k}\ .$$ The sequence $(a_k)_{k\geq-1}$ has finite range $[0\,..\,9]$, but is not ultimately periodic, nor "random". (If this sequence were ultimately periodic $\sqrt{2}$ would be rational.)