Let $a_n$ be the number of mappings $f : [n] \rightarrow [n]$ such that if $f$ takes on a value $i$,then it takes on all the values $j: 1\le j\le i$. Find a closed form(i.e. a form that can be evaluated in a finite number of operations) of the generating function of $a_n$.
For a mapping that satisfies the above condition, its image $f([n])$ must be one of ${[1],[2],\dots,[n]}$.
#surjections from $[n]$ to $[k]$ = $k!S(n,k)$, where $S(n,k)$ stands for Stirling number of the second kind.
Thus the generating function
$$A(x)=\sum_{n=0}^{\infty}x^n\sum_{k=1}^n k!S(n,k)=\sum_{k=0}^\infty k! \sum_{n=k}^\infty x^n S(n,k)$$
And we already know the generating function of S(n,k) has a closed form:
$$\sum_{n=k}^\infty x^n S(n,k)=\frac{x^k}{(1-x)(1-2x)\dots(1-kx)}$$
But how do I obtain a closed form of the generating function of $a_n$ using the above equations?