How to calculate second-order correction to the energy from matrix elements of perturbation?

A particle is in the one dimensional harmonic potential $$V(x)=\frac{1}{2}m\omega^2x^2$$ with a small perturbation $$V'$$. I want to calculate the first- and second order correction to the ground state energy through the matrix elements: $$\begin{equation} \langle n'|V'|n\rangle =\frac{\hbar\omega\alpha}{4}[\sqrt{(n+1)(n+2)}\delta_{n',n+2}+(1+2n)\delta_{n',n}+\sqrt{(n)(n-1)}\delta_{n',n-2}] \end{equation}$$ From this I got that $$V'(x)=\frac{1}{2}m\omega^2\alpha x^2$$ and I calculated the first order correction to the ground state energy as $$E^1_0=\frac{1}{4}\alpha\omega\hbar$$. I would like to calculate the second order correction to the ground state energy through the matrix elements, but I do not know how to tackle that part, and I am hoping that somebody can give me a hint.

$$E_n^{(1)} = \langle n^{(0)}|V|n^{(0)}\rangle \\ \\ E_n^{(2)} = \sum_{i\neq n}\frac{|\langle n^{(0)}|V|i^{(0)}\rangle|^2}{E_n^{(0)}-E_i^{(0)}}.$$
Now use your rewritten form of $$V$$, which you deduced from raising and lowering operators, to evaluate $$|\langle n^{(0)}|V|i^{(0)}\rangle|^2$$. Clear from your Kronecker deltas, this is only nonzero for the $$i$$'s that fall within $$n\pm2$$, but not necessarily all of them (can you see why?).
• Thanks for your answer. That puts the limit on the sum, of course. However, I am not quite sure if I am allowed/supposed to choose $n=0$ for the ground state. In that case, I get that $\sum_{i\neq n}|\langle n^{(0)}|V|i^{(0)}\rangle|^2=\frac{1}{2}\hbar\omega\alpha$, since i cannot be smaller than the ground state. – Manó Mar 30 at 19:38
• Restriction on the sum is one, so there is no correction from the ground state on the ground state, but I was also getting at there is no correction from neighboring states, only from those that are $2$ energy levels away. So, for your ground state, only a correction from $|2^{(0)}\rangle$, which it looks like you're just about there, just need to check the factors: $(\frac{\sqrt{2}\hbar\omega\alpha}{4})^2/(-2\hbar\omega)$ – dsm Mar 30 at 19:52
• Great, then I understand it. Thanks for your time! Edit: oh yes, I have to square the whole term. I forgot to square $\frac{\hbar \omega\alpha}{4}$. Again, thank you. – Manó Mar 30 at 20:03