  The description of the long-term dynamics of highly elliptic orbits under
third-body perturbations may require an expansion of the disturbing function in
series of the semi-major axes ratio up to higher orders. To avoid dealing with
long series in trigonometric functions, we refer the motion to the apsidal
frame and efficiently remove the short-period effects of this expansion in
vectorial form up to an arbitrary order. We then provide the variation
equations of the two fundamental vectors of the Keplerian motion by analogous
vectorial recurrences, which are free from singularities and take a compact
form useful for the numerical propagation of the flow in mean elements.
