The following code
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\theoremstyle{remark}
\begin{document}
\title{Extra Credit}
\maketitle
\begin{definition}
If f is analytic at $z_0$, then the series
$$f(z_0) + f'(z_0)(z-z_0) + \frac{f''(z_0)}{2!}(z-z_0)^2 + \cdots = \sum_{n=0}^{\infty} \frac{f^{(n)}(z_0)}{n!}(z-z_0)^n \hspace{1cm}(1)$$
is called the Taylor series for f around $z_0$.
\end{definition}
\begin{theorem}
If f is analytic inside and on the simple closed positively oriented contour $\Gamma$ and if $z_0$ is any point inside $\Gamma$, then
$$f^{(n)}(z_0) = \frac{n!}{2\pi i} \int_{\Gamma} \frac{f(\zeta)}{(\zeta - z_0)^{n+1}}d\zeta \hspace{1cm} (n=1,2,3, \cdots )$$ \hfill (2)
\end{theorem}\hrulefill
How can I align the (1) and (2), and also get (2) to be on the same line as (n=1,2,3,...)?



$$... $$syntax in a latex document. It does not follow latex configurations. – daleif Mar 30 '19 at 17:58\theoremstyleafter all your\newtheoremdefinitions. Also, it's more traditional for definitions to have their text in upright type; for that\theoremstyle{definition}would be the appropriate command. – barbara beeton Mar 30 '19 at 20:08