What's the math behind generators with electromagnet cores?
Why does it take less electricity to maintain the electromagnet than the electromagnet generates?


Why not? The two are mostly unrelated - the amount of power to run the electromagnet is determined by resistive losses, while the power generated is mostly dependent on speed of rotation.


  In an ideal world, how much power would it take to maintain the electromagnet?


Theoretically an electromagnet made of superconductors can be maintained with zero input power. Currently this is only used in MRI machines, which need a very high field strength, because the superconductors have to be kept very cold.