Do you know how to calculate the following commutator:
\begin{equation}[A^{n},A^{\dagger n}]\end{equation} knowing that $[A,A^{\dagger}]=1$.
Do you know how to calculate the following commutator:
\begin{equation}[A^{n},A^{\dagger n}]\end{equation} knowing that $[A,A^{\dagger}]=1$.
We start by deriving a useful expression needed below:
$$[A^n,B] = n[A,B] A^{n-1}$$
for all operators $A,B$ satisfying $[A,[A,B]] = 0$ using induction (for general operators the result can be written $[A^n,B] = \sum_{k=0}^{n-1}A^k[A,B]A^{n-1-k}$). The base-case is true and for the inductive step we have
$$[A^{n+1},B] = A(A^nB) - BA^{n+1} = A(n[A,B]A^{n-1} + BA^n) - BA^{n+1} \\= n[A,B]A^n + ([A,B] + BA)A^n - BA^{n+1} = (n+1)[A,B]A^{n}$$
Specifying to the case where $B = A^\dagger$ and $[A,B] = 1$ for which $[A,[A,B]] = 0$ is satisfied we get $[A^n,B] = nA^{n-1}$ and $[A,B^n] = nB^{n-1}$. Now using this we can evaluate the commutator in question. Starting with $A^nB^n$ and moving the $B$'s to the left hand side we get
$$A^nB^n = A^{n-1}(AB^n) = A^{n-1}(nB^{n-1} + B^nA) = nA^{n-1}B^{n-1} + A^{n-2}(AB^n)A\\ = nA^{n-1}B^{n-1} + nA^{n-2}B^{n-1} + A^{n-3}(AB^n)A^2 = \ldots$$
continuing this process we arrive at (this again can be proven using induction)
$$[A^n,B^n] = n\sum_{k=0}^{n-1} A^kB^{n-1}A^{n-1-k}$$
which is one way of presenting the answer. With commutators like this there is always some ambiguity in how we do this, should we write it on the form $\sum a_{i,j}A^iB^j$ or $\sum a_{i,j}B^jA^i$ or a mix as above? This has to be specified. For typical physical applications the form with all the $A$'s to the right is perhaps the most useful since when acting on eigenstates $A^n\left|k\right> = 0$ for $n> k$ so we can immediately see what terms are relevant or not.
Sidenote: for applications (say with respect to the quantum harmonic oscillator) where we are to compute expressions like $\left<\psi\right|[A^n,B^n]\left|\psi\right>$ where $\left|\psi\right>$ is some state-vector then we don't need to derive an expression as above. We can first expand $\left|\psi\right> = \sum c_k \left|k\right>$ where $\left|k\right>$ are eigenstates and compute the expression using the normal ladder rules
$$[A^n,B^n]\left|k\right> = A^nB^n\left|k\right> - B^nA^n\left|k\right> = \left[\sqrt{(k+1)(k+2)\cdots(k+n)}^2 - \sqrt{k(k-1)\cdots(k-n+1)}\right]\left|k\right>$$
so
$$\left<\psi\right|[A^n,B^n]\left|\psi\right> = n!\sum c_k \left[{k+n\choose n} - {k\choose n}\right]$$