R[n_] := Sqrt[4 k] Plus[1, Total[k^# R[#, Q] & /@ Range[n]]]
Vq[n_] := Total[(-1)^(# - 1) (r Cos[Q] )^(2 #)/((2 #)!) & /@ Range[2, n]]
RRules[n_] := With[{H = ReplaceAll[1/2 r^2 + (Vq[n + 1]), {r -> R[n]}]},
Function[{rules}, Nest[Rule[#[[1]], ReplaceAll[#[[2]], rules]] & /@ # &, rules, n]][
Flatten[R[#, Q] -> Expand[(-1/4) ReplaceAll[ Coefficient[H, k^(# + 1)], {R[#, Q] -> 0}]] & /@ Range[n]]]]
dt[n_] := With[{rules = RRules[n]}, Expand[Subtract[ Times[Expand[D[R[n] /. rules, Q]], Normal@Series[1/R[n], {k, 0, n}] /. rules, Cot[Q] ], 1]]]
dtCoefficients[n_] := With[{dtn = dt[n]}, Function[{a}, Coefficient[ Coefficient[dtn, k^a], Cos[Q]^(2 (a + #))] & /@ Range[a]] /@ Range[n]]
dtToEllK[NMax_] := ReplaceAll[-dt[NMax], {Cos[Q]^n_ :> Divide[Binomial[n, n/2], (2^(n))], k^n_ /; n > NMax -> 0} ]
Flatten[Numerator[dtCoefficients[10]]]
dtToEllK[5]