\[ \boxed { {x}^{2}{\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) -2\,x \left ( {x}^{2}-a \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) + \left ( 2\,n{x}^{2}+ \left ( \left ( -1 \right ) ^{n}-1 \right ) a \right ) y \left ( x \right ) =0} \]
Mathematica: cpu = 0.266034 (sec), leaf count = 252 \[ \left \{\left \{y(x)\to c_1 (-1)^{\frac {1}{4} \left (-\sqrt {4 a^2-4 a (-1)^n+1}-2 a+1\right )} x^{\frac {1}{2} \left (-\sqrt {4 a^2-4 a (-1)^n+1}-2 a+1\right )} \, _1F_1\left (-\frac {a}{2}-\frac {n}{2}-\frac {1}{4} \sqrt {4 a^2-4 (-1)^n a+1}+\frac {1}{4};1-\frac {1}{2} \sqrt {4 a^2-4 (-1)^n a+1};x^2\right )+c_2 (-1)^{\frac {1}{4} \left (\sqrt {4 a^2-4 a (-1)^n+1}-2 a+1\right )} x^{\frac {1}{2} \left (\sqrt {4 a^2-4 a (-1)^n+1}-2 a+1\right )} \, _1F_1\left (-\frac {a}{2}-\frac {n}{2}+\frac {1}{4} \sqrt {4 a^2-4 (-1)^n a+1}+\frac {1}{4};\frac {1}{2} \sqrt {4 a^2-4 (-1)^n a+1}+1;x^2\right )\right \}\right \} \]
Maple: cpu = 0.421 (sec), leaf count = 93 \[ \left \{ y \left ( x \right ) ={\it \_C1}\,{x}^{-{\frac {1}{2}}-a}{ {\rm e}^{{\frac {{x}^{2}}{2}}}}{{\sl M}_{{\frac {n}{2}}+{\frac {a}{2}} +{\frac {1}{4}},\,{\frac {1}{4}\sqrt {1-4\, \left ( -1 \right ) ^{n}a+4 \,{a}^{2}}}}\left ({x}^{2}\right )}+{\it \_C2}\,{x}^{-{\frac {1}{2}}-a}{ {\rm e}^{{\frac {{x}^{2}}{2}}}}{{\sl W}_{{\frac {n}{2}}+{\frac {a}{2}} +{\frac {1}{4}},\,{\frac {1}{4}\sqrt {1-4\, \left ( -1 \right ) ^{n}a+4 \,{a}^{2}}}}\left ({x}^{2}\right )} \right \} \]