Coding challenge

Write some code to set $a_0=0$ and $a_1=1/2$, then iterate on $a_{n+1}=\frac{1+a_n+a^3_{n-1}}{3}$ for $n>1$. What does $a_n$ eventually become, and how does this eventual result depend on $a_0$? (Ref: Borwein, p.101.)

Type your code here:


Lua reference

See your results here: