Oh boy... I suspect you are in for quite a learning experience.
Alright, first let's ditch that awful equation you are using. Main reason is it totally divorces you from any intuitive feel for what is going on. I prefer to use this version:
V * Ton
---------------- = Npri
Ae * dB * 100
Where V is the voltage applied to the primary (a constant DC voltage is assumed), Ton is the time said voltage is applied in microseconds (usually just under half a period), Ae is the minimum core area in cm², Bmax is the *total* flux change in Teslas (note that in a push-pull or bridge converter this will be from -Bmax to +Bmax; in a single ended converter this will be from ~0B to +Bmax). The 100 multiplier in the denominator can be dropped if Ae is in mm².
Now that that is out of the way, the next issue is the choice of dB... Even with current mode control or pulse-by-pulse current limiting I really don't like running at a dB that exceeds the single quadrant saturation flux density for the chosen core material (for most power ferrites Bsat is in the range of 0.35 to 0.4T). This is less of a problem than it might appear, because core losses for most power ferrites are approximately proportional to the 2.6 power of flux density and the 1.6 power of frequency, so as you go up in frequency you have to go down in flux density (or, conversely, as you go up in flux density you have to really go down in frequency). The upshot of this is that you will typically be "core loss limited" in allowed flux density swing above 20-30kHz.
A correlated issue is that larger cores tend to have a worse thermal resistance relatively speaking than smaller cores because losses are proportional to volume while heat dissipation is proportional area.
At any rate, my first pass estimate for this application would be a switching frequency of 40kHz and a total flux density swing of 0.3T.
Next issue is a bit more thorny and will only be solved through trial and error: lots of (secondary) turns means lots of stray capacitance. This will also drive the ideal switching frequency down, even though that results in needing more turns which itself drives the stray capacitance up! Magnetics sure is fun, ain't it?
Next issue is probably a plus here - U cores are commonly used for high voltage transformers and the usual arrangement is to put the primary on one side and the secondary on the other, even though this results in the maximum possible leakage inductance (which is the inductance that results from flux not coupling both windings; it is basically an air core inductor in series with each winding). Leakage inductance causes all sorts of problems like voltage spikes, ringing, and robbing volt*seconds from the secondary, but it is the latter issue that might be helpful here, because it will limit short circuit current.
So plugging all of this back in to the equation above:
400V * (25us * 0.48)
------------------------ = 28 turns
5.6cm² * 0.3 * 100
Which assumes that 400V is the minimum primary voltage and 48% is the maximum duty cycle possible; this means the effective primary voltage is 0.96 * 400, or 384V, so the number of secondary turns will need to be more than the naive estimate of 100x higher than the primary to deliver 40kV. In this case, at least 2916 turns. Gulp.
That's a reasonable number of primary turns, as long as you only need to handle about ~1kW or so because your chosen core simply won't have enough window area (ie - area available for windings). Fortunately, square cross section U and E cores (as well as toroids) are easy to "parallel" by epoxying them together, and as the number of turns required goes down as core area goes up you'll probably only need 6 or 7 cores, not 10.
Regardless, each layer of a 40kV total secondary will be supporting a rather high voltage which means there will be a - possibly overwhelming - temptation for arcing to occur between layers. You'll definitely want to use triple (or quad!) insulated magnet wire and you'll probably want to coat each layer in transformer insulating varnish and/or wrap it with polyimide (ie - Kapton) tape. #28AWG (approx. 0.35mm) should be sufficient for the desired output current of 0.25A and the diameter is well under the skin depth so that's not an issue. Quad insulated magnet wire isn't exactly an ebay item; I purchase it MWS Industries, but beware they are an old school type of business that does quoting by phone, etc., so a bit atavistic in this day and age.
And let's not forget about the primary - it will need to handle ~25A or so, and because of skin and proximity effects you might have to resort to a foil winding to keep down the losses. A quick-n-dirty alternative is to simply parallel a bunch of smaller magnet wires (with a diameter of around 2-3x the skin depth at the switching frequency [skin depth in mm = 66.2/(F^0.5), where F is in Hz]). In this case, twisting together 9 #18 (~0.85mm) wires should do.
Since you ain't paying me for my help I'm going to stop here, but you still have a lot of learning ahead of you, grasshopper.