Background: My very first and naive take on the Project Euler problem 513 went wrong, as I counted also triples violating the triangle inequality.
Many formulas return an invalid result for an invalid input. For example, the Heron's formula for the non-triangle with sides $(a, b, c) = (1, 13, 18)$ returns $\sqrt{-1440}$, which clearly indicates that something went wrong.
The median connecting C and the midpoint of AB gets computed as $m_c = \sqrt\frac{2a^2 + 2b^2 - c^2}4$ and the outcome for my non-triangle is $2$. I wonder, if there's may be any geometrical interpretation...
The following paper might be of some use: http://arxiv.org/vc/arxiv/papers/0901/0901.1857v1.pdf
It explains how to calculate the amount of integral isosceles and pythagorean triples with an integral median. However, no equation is given for scalene triangles, and further research on my part has proved to be insufficient.