Presidents who did not get nomination of their party?

If they do not get nomination of their party it is impossible for them to serve.