I am trying to find a closed form for S(n), where $$ S(n) = \begin{cases} 1 & n = 0\\ (S(n-1))^2 + 2(n-1) & n>0 \end{cases} $$
How can I go about solving this with repeated substitution? When I try the substitution technique, I don’t see any obvious solution for the closed form. Help would be really appreciated.