The first formula with division is correct. The second one is either wrong or is designed to take non-premultiplied colors and produce premultiplied ones.
Anyway, it's pretty easy to derive the non-premultiplied formula from the premultiplied one, which happens to be very simple and intuitive:
blended = front + back * (1.0 - front.a);
The intuition is: we take the front color and add a bit of the back color to it, namely as much as we can see through the front color.
The non-premultiplied version will then be:
blended.a = front.a + back.a * (1.0 - front.a);
blended.rgb = (front.rgb * front.a + back.rgb * back.a * (1.0 - front.a)) / blended.a;
Note that this formula, as well as the ones you presented assumes alpha to be in the range of [0, 1] rather than [0, 255].