To understand the behavior of $a_n$, notice that $$ f(x)=\frac{x^2}{2}+O(x^4) $$ as $x \to 0$. Hence $a_n \approx \frac{1}{2n^2}$ as $n \gg 1$. Therefore you can compare $a_n^w$ to $n^{-2w}$ when $n \gg 1$.
To understand the behavior of $a_n$, notice that $$ f(x)=\frac{x^2}{2}+O(x^4) $$ as $x \to 0$. Hence $a_n \approx \frac{1}{2n^2}$ as $n \gg 1$. Therefore you can compare $a_n^w$ to $n^{-2w}$ when $n \gg 1$.