How is it possible to define the operator $(x+\frac{d}{dx})^n$ as a function of $n$? I use
op[x_] = (x + D[#, x]) &;
with the action on, for example, $\cos(x)$
op[x][Cos[x]]
for $n=1$. How is it possible to extend the definition for an arbitrary $n$?