The equation is:
$$
{N^2\over t} = \frac{E \times S}{C}
$$
for \$N=\$ f-number; \$t=\$exposure time (in seconds); \$E=\$ illuminance; \$S=\$ ISO value; and \$C=\$ incident-light meter calibration constant.
Or, \$N^2 = (E\times S\times t)\,/\,C\$, as you've summarized it with \$N\$ as aperture on the left. Note that the calibration constant \$C\$ corresponds to your meter, not to the camera, and usually depends on the shape of the light-receiving surface (flat or dome).
Figure out the aperture and exposure time you need from this, and then adjust these for your neutral density filter and desired exposure compensation. Each 1-unit change in EV is one stop, and you can adjust either exposure time or aperture (or for that matter, ISO) correspondingly.
Or to put it simply: Add together the neutral-density filter EV value (as a positive number of stops) and your desired exposure correction EV value. If the result is positive, widen the aperture by one stop for each correction EV. If the result is negative, narrow the aperture by that amount.
If you want to put this in formula form, that'd be:
$$
N = \left.\sqrt{{E\times S\times t\over C}}\middle/\sqrt{2^{\text{EV compensation}\; +\; \text{ND filter stops}}}\right.
$$
There are other ways to arrange the EV compensation and ND filter values, of course, but this representation matches the way a photographer thinks about it — setting the basic exposure parameters and then factoring in the compensation. (You could shift the equation around so the EV compensation and ND filter stops values are in the first √, and probably do want to do that as an optimization.)
It is often the case that the range of adjustable apertures does not give the flexibility one would need for this in the real world. Your lens probably does not go to f/64 or f/1.0. In this case, you'll need to adjust one of the other parameters, of course.
It may help to consider this visualization:

The adjustable exposure parameters on camera are the axes — aperture (f-number), shutter speed, and ISO. The target exposure is the volume of the cube.
Numerically in the basic formula, this volume is determined by the illuminance and calibration constant values. (The "calibration constant" is a value selected to give a nominally-correct overall exposure for a given scene illuminance.)
Exposure compensation is basically you as a human overriding that measurement and increasing or decreasing the target volume. Likewise, adding a ND filter halves the volume (for every stop).