Find a uniformly continuous function such that $a_{n+1}=f(a_n)$

$a_{n+1} = a_n - a_n^2$, $a_1 = 2/3$. for $n\ge1$

a) Show the series converges and find its limit.
b) find a uniformly continuous $f:\mathbb{R}\rightarrow \mathbb{R}$ such that: $a_{n+1}=f(a_n) \forall n \in \mathbb{N}$.

section (a) is very technically, I proved $\{a_n\}$ is monotonically decreasing and bounded bellow, And using limits arithmetic found $L=0$.

section (b) is quite tricky for me. I'd be glad for help. Thanks!

Define $f(x)=x(1-x)$ for $x\in[0,1]$ and $f(x)=0$ otherwise. $f$ is clearly (*) uniformly continuous and $f(a_n)=a_n-a_n^2=a_{n+1}$.
(*) It is continuous since $f(0)=f(1)=0$ and uniformly continuous since it is compactly supported (the last part is easy to see noting that continuous functions are uniformly continuous on compact sets).
• It is continuous since $f(0)=f(1)=0$ and uniformly continuous since it is compactly supported. – J.R. Jan 24 '14 at 17:52
• Sorry what has $f(0)=f(1)=0$ got to do with continuity?? It is continuous as a polynomial. – JP McCarthy Jan 24 '14 at 18:01
• But outside of $[0,1]$ it is defined as $0$ so it has to match up at the boundary. – J.R. Jan 24 '14 at 18:04