\documentclass[12pt]{article}
\usepackage{graphicx}    % needed for including graphics e.g. EPS, PS
\topmargin -1.5cm        % read Lamport p.163
\oddsidemargin -0.04cm   % read Lamport p.163
\evensidemargin -0.04cm  % same as oddsidemargin but for left-hand pages
\textwidth 16.59cm
\textheight 21.94cm
%\pagestyle{empty}       % Uncomment if don't want page numbers
\parskip 1.5pt           % sets spacing between paragraphs
%\renewcommand{\baselinestretch}{1.5} % Uncomment for 1.5 spacing between lines
\parindent  25pt         % sets leading space for paragraphs
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{verbatim}
\usepackage{bm}

\setlength{\oddsidemargin}{-0.25in}
\setlength{\textwidth}{6.75in}
\setlength{\topmargin}{-0.5in}
\setlength{\textheight}{8.75in}


\parindent=0in

\newenvironment{previousequation}[1]{$$ \renewcommand{\@previousequationnumber}{\ref{#1}}}{\eqno{\hbox{(\@previousequationnumber)}}$$\global\@ignoretrue}

\def\shadowbox{\hbox{\rule[0.05ex]{0.1ex}{1.15ex}%
\hspace{-0.0ex}\rule[-0.0ex]{1.2ex}{0.1ex}%
\hspace{0.0ex}\rule[-0.0ex]{0.1ex}{1.2ex}\hspace{-1.3ex}%
\rule[1.15ex]{1.25ex}{0.1ex}\hspace{-0.0ex}\rule[-0.25ex]{0.3ex}{1.1ex}%
\hspace{-1.2ex}\rule[-0.25ex]{1.1ex}{0.25ex}}}
\def\qed{\ifmmode \hbox{\hfill\shadowbox}
     \else \hphantom{x}\hfill\shadowbox \fi}
\def\QED{\mbox{\phantom{m}}\nolinebreak\hfill$\,\shadowbox$}
\def\proof{\noindent{\bf Proof: }}
%\def\endproof{\hspace*{\fill} \qed\par\endtrivlist\unskip}
\def\endproof{\hspace*{\fill} \qed\par\endtrivlist\vskip3pt}

\newenvironment{myproof}{\noindent{\bf Proof. }\rm}{\par\medskip}
\newenvironment{mysolution}{\noindent{\bf Solution. }\rm}{\par\medskip}
\def\endmyproof{\hspace*{\fill}~\qed\par\endtrivlist\vskip8pt}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{example}[theorem]{Example}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{remark}[theorem]{Remark}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{titlesec}
\titleformat{\section}{\normalsize\bfseries}{\thesection.}{.5em}{}
\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{.5em}{}
\setcounter{secnumdepth}{3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\baselineskip=18pt
\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(170,2)
\linethickness{1mm}
  \put(0, 0){\line(1,0){170}}
\end{picture}
%The following two lines of code are a hack on spacing - comment them out (like this line) and see what happens
${ }^{ }$\\
\vspace{.125in}
\begin{LARGE}\textbf{An Elementary Proof of the Goldbach Conjecture}\end{LARGE}\\
\begin{picture}(170,1)
\linethickness{.3mm}
  \put(0, 0){\line(1,0){170}}
\end{picture}
%The following two lines of code are a hack on spacing - comment them out (like this line) and see what happens
${ }^{ }$\\
\vspace{.0625in}
\begin{large}The Name of a Student Who Has Made it to Their Senior Project\end{large}
\begin{picture}(170,1)
\linethickness{1mm}
  \put(0, 0){\line(1,0){170}}
\end{picture}
\end{center}

%The following two commands reset the theorem and equation numbering counters as we enter each section, and appear repeatedly

\numberwithin{equation}{section}
\numberwithin{theorem}{section}

\section{Introduction}

In which you explain your paper in broad terms.

\numberwithin{equation}{section}
\numberwithin{theorem}{section}

\section{Sufficient Background Information}
In which you provide the reader with sufficient elementary knowledge and / or results to prepare him / her to understand your contribution to the field. An example of an align environment, with some spacing commands, follows:
\begin{align}
x&\equiv a_1\,\,(\text{mod}\,\,m_1)\\
&\equiv a_2\,\,(\text{mod}\,\,m_2)\\
&\,\,\,\vdots\nonumber\\
&\equiv a_r\,\,(\text{mod}\,\,m_r)
\end{align}

\section{Another Section}

\begin{alignat}{3}
V_i &= v_i - q_i v_j, & \qquad X_i &= x_i - q_i x_j,& \qquad U_i &= u_i, \qquad \text{for $i\ne j\,$;}\nonumber\\
V_j &= v_j, & \qquad X_j &= x_j,& \qquad U_j & u_j + \sum_{i\ne j} q_i u_i.\label{eq:B}
\end{alignat}
By Equation \eqref{eq:B} we can see how to refer, or not refer, to labeled equations.\\


Further, we want to show vertical spacing, with and without line breaks:


Next we want to illustrate that arrays are useful, and we can delineate the columns and rows of the array with vertical and horizontal lines, respectively:
\begin{center}
$\begin{array}{|c||c|c|c|c|}\hline
&\overline{0}&\overline{1}&\overline{2}&\overline{3}\\ \hline\hline
\psi_1&\overline{0}&\overline{0}&\overline{0}&\overline{0}\\ \hline
\psi_2&\overline{0}&\overline{0}&\overline{2}&\overline{0}\\ \hline
\psi_3&\overline{0}&\overline{0}&\overline{0}&\overline{2}\\ \hline
\psi_4&\overline{0}&\overline{0}&\overline{2}&\overline{2}\\ \hline
\end{array}$
\end{center}

\numberwithin{equation}{subsection}
\numberwithin{theorem}{subsection}

\subsection{A Subsection if Necessary}
These are useful when we want to elaborate on a subtopic of the current section, and our elaboration is sufficiently self-contained.

\begin{lemma} Let $e$ be a positive integer.\\
$(i)$ Let $\overline{x}\in {\mathbb Z}_{2^e}$.  Then there exist $i,k,m\in {\mathbb Z}$ with $0\leq i\leq e$ such that $\overline{x}=\overline{2^i*5^k*(-1)^m}$.\\
$(ii)$ Let $i,j,k,\ell,m,n\in {\mathbb Z}$ such that $0\leq i$, $j\leq e$.  Then $\overline{2^i*5^k*(-1)^m}=\overline{2^j*5^\ell*(-1)^n}$ iff $i=j$ and $5^k*(-1)^m\equiv 5^\ell*(-1)^n \pmod{2^{e-1}}$.\\
$(iii)$ If $e\geq 2$, then $\overline{5^k*(-1)^m}=\overline{5^\ell*(-1)^n}$ iff $m\equiv n \pmod{2}$ and $k\equiv \ell \pmod{2^{e-2}}$.\\
$(iv)$ If $e\geq 2$, then $(\overline{5})^{2^{e-2}}=\overline{1}$.
\end{lemma}

\begin{lemma} This lemma shows that footnoting\footnote{We place some comment that is relevant, but which if placed within the body of the paper would interrupt the flow more than if placed at the bottom of the page.} may be useful, except immediately after a variable name.\label{identity}
\end{lemma}

\begin{proof}

\begin{align}
Ax&=b\nonumber\\
\text{Therefore}\qquad x&=A^{-1}b
\end{align}

\end{proof}

\begin{definition}
A definition, which is necessary for understanding or for proving Some Theorem.
\end{definition}

\begin{theorem} A theorem, which plays an integral role in your paper.\label{distributive}
\end{theorem}

\numberwithin{equation}{section}
\numberwithin{theorem}{section}

\section{Another Section}

\begin{theorem} $\overline{x}\in {\mathbb Z}_{p^e}$ is integrable if and only if $\overline{x}\in p{\mathbb Z}_{p^e}$.
\end{theorem}

\begin{proof}
Let $\overline{x}\in {\mathbb Z}_{p^e}$ be integrable. Then, because of various previously proved or known theorems, we conclude that $\overline{x}\in p{\mathbb Z}_{p^e}$. Conversely, let $\overline{x}\in p{\mathbb Z}_{p^e}$ and note that because of some, possibly other, previously proved or known theorems, we arrive at the conclusion that $\overline{x}\in {\mathbb Z}_{p^e}$ is integrable.
\end{proof}

\numberwithin{equation}{subsection}
\numberwithin{theorem}{subsection}

\subsection{In Which We Illustrate How to Make Bold Math Mode in a Section Title: ${\boldsymbol{X^n}}$}

And in which we show a multiple align environment, as follows:

\begin{alignat}{3}
a\cdot0 &= a(0+0)\nonumber &&\qquad\text{by Lemma \ref{identity}}\\
&= a\cdot0+a\cdot0 &&\qquad\text{by Theorem \ref{distributive}} \label{1}
\end{alignat}

\section{Recap and other opportunities}

We have elaborated the original idea to a very fun and interesting topic.\QED \\

\textbf{REFERENCES}\\
\setlength{\unitlength}{1mm}
\begin{picture}(170,.3)
\linethickness{.3mm}
  \put(0, 0){\line(1,0){170}}
\end{picture}
\baselineskip=12pt
\begin{enumerate}
\item\label{krebs} M. Krebs, C. Emmons, T. Shaheen, How to differentiate an Integer Modulo $n$, \textit{The College Mathematics Journal} {\bf{40}}(5)(2009)345-353.
\item\label{barbeau} E. Barbeau, Remarks on an arithmetic derivative, \textit{Canad. Math. Bull.} {\bf{4}}(1961)117-122.
\item\label{ufnarovski} V. Ufnarovski, and B. Ahlander, How to differentiate a number, \textit{J. Integer Seq.} {\bf{6}}(2003).
\item\label{westrick} L. Westrick, Investigations of the Number Derivative; available at http://web.mit.edu/lwest/\\
    www/intmain.pdf.
\item\label{niven} I. Niven, H. Zuckerman, and H. Montgomery, \textit{An Introduction to the Theory of Numbers}, 5th ed., John Wiley and Sons, New York, $1991$.\\
\item[G.] J.A. Gallian, \textit{Contemporary Abstract Algebra}, 6th ed., Houghton Mifflin Co., New York, NY, 2006.
\end{enumerate}

\end{document} 