If it get's too cumbersome, you can if you wish work on in in Mathematica using this code:

Code:

nval = 1;
myop = D[#1, x] - (a/x)*#1 &
myeqn = FullSimplify[x^(2*nval)*
Nest[myop, f[x], nval]] == k*f[x]
FullSimplify[DSolve[myeqn, f, x]]

Here's n=3 using the code although I haven't checked it throughly and where I've left the Mathematica-specific notation in since I just copied it directly over so I didn't have to type in the latex.

$\displaystyle x^{2+a} \left(e^{-\frac{k^{1/3}}{x}} C[1]+e^{\frac{(-1)^{1/3} k^{1/3}}{x}} C[2]+e^{-\frac{(-1)^{2/3} k^{1/3}}{x}} C[3]\right)$

As a check of the code, here is n=2 which I believe is the same as Danny's solution:

$\displaystyle e^{\frac{\sqrt{k}}{x}} x^{1+a} C[1]+\frac{e^{-\frac{\sqrt{k}}{x}} x^{1+a} C[2]}{2 \sqrt{k}}$

Double-check everything though ok.