\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt

\begin{center}

THEORY OF NUMBERS

GAUSSIAN INTEGERS

\end{center}

$\alpha=a+ib,\ a\ b$ are rational integers.

Conjugate of $\alpha:\alpha'=a-ib$

Norm of $\alpha=N(\alpha)=\alpha\alpha'$

\begin{description}

\item[(i)]
$N(\alpha)$ is a rational integer.

\item[(ii)]
$N(\alpha)\geq0$ equality$\Leftrightarrow\alpha=0$.

\item[(iii)]
$N(\alpha\beta)=N(\alpha)N(\beta)$ so $\mu|\nu\Rightarrow
N(\mu)|N(\nu)$

\end{description}

Unit: $\varepsilon$ such that $\varepsilon,\ \varepsilon^{-1}$ are
both gaussian integers, $\varepsilon|\alpha$ for all $\alpha$.

There are exactly 4 units $\pm1\ \pm i$

If $\alpha_1=\varepsilon\alpha$ we say $\alpha_1$ is associated to
$\alpha$.

Gaussian Prime: $\pi\ N(\pi)>1$, which has no divisors other than
units or associates. If $N(\alpha)=p$ then $\alpha$ is $G$-prime,
but the converse is not necessarily true.

\begin{description}

\item[Theorem (Euclidean Algorithm)]
Suppose $\alpha,\ \beta$ are $G$-integers, $\beta\neq0$

$\exists \mu,\ \lambda$ such that $\alpha=\mu\beta+\lambda\
N(\lambda<N(\beta)$

\item[Proof]
$\frac{\alpha}{\beta}=x+iy\ x, y$ rational. $\exists$ rational
integers $u,\ v$ such that $|x-v|\leq\frac{1}{2}\ |y-v|\leq
\frac{1}{2}$

Write $\mu=u+iv\ \lambda=\alpha-\mu\beta$

\begin{eqnarray*}
N(\lambda)&=& N(\alpha-\mu\beta)\\ &=&|\alpha-\mu\beta|^2\\
&=&|\beta|^2\left|\frac{\alpha}{\beta}-\mu\right|^2\\
&=&|\beta|^2\left\{(x-u)^2+(y-v)^2\right\}\\
&\leq&\frac{1}{2}|\beta|^2<N(\beta)
\end{eqnarray*}


\item[Theorem (Greatest common denominator)]
$\alpha,\ \beta$ not both zero. $\exists \delta $such that

\begin{description}

\item[(i)]
$\delta|\alpha;\ \delta|\beta$

\item[(ii)]
$\eta|\alpha;\ \eta|\beta\Rightarrow\eta|\delta$

\item[(iii)]
$\exists \lambda\mu$ such that $\delta=\lambda\alpha+\mu\beta$

\end{description}

\item[Proof]
Consider the set $S$ of all $G$-integers $\delta$ of the form
$\lambda\alpha+\mu\beta$.

Let $\delta$ be such that $N(\delta)$ is minimal and positive. The
proof follows as in the classical case.

\item[Theorem]
$\pi|\alpha\beta\Rightarrow\pi|\alpha$ or $\pi|\beta$.

\item[Proof]
Suppose $\pi$ does not divide $\alpha$ then
$(\pi,\alpha)=\varepsilon.\ \exists \lambda,\ \mu$ such that
$\varepsilon=\lambda\pi+\mu\alpha\
\beta=\lambda\pi\beta+\mu\alpha\beta$ therefore $\pi|\beta$

\item[Theorem (Unique factorisation)]
Proof analogous to classical case.

\item[Another proof of Fermat's theorem]
Suppose $p\equiv1$ mod 4. $\exists x$ such that $x^2+1\equiv 0$
mod $p$. $\exists \pi$ such that $\pi|p$. $\pi$ is not associated
to $p$.

For $\pi|x^2-1$ and so $\pi|(x+i)(x-i)$ therefore $\pi|x+i$ or
$\pi|x-i$.

$\pi$ associated to $p\Rightarrow p|x+i$ or $p|x-i$ which are not
so therefore $N(\pi)|N(p)=p^2$ So $N(\pi)=1,p,p^2$

$N(\pi\neq1\ \pi$ is prime $N(\pi\neq p^2\ \pi$ is not associated
to $p$ therefore $N(\pi)=p$.

If $\pi=a+ib,\ p=a^2+b^2.$

\item[Theorem]
The $G$-primes are

\begin{description}

\item[(i)]
$1+i$

\item[(ii)]
$q\equiv-1\ (4)$

\item[(iii)]
$a+ib\ a>-\ b>0\ a^2+b^2=p\ p\equiv1\ (4)$

\end{description}

and their associates.

\item[Proof]
$\pi|N(\pi)=p_1\ldots p_\nu$ therefore every $G$-prime divides a
rational prime.

\begin{description}

\item[(i)]
$N(1+i)=2$

\item[(ii)]
$q\equiv -1\ (4)\ \pi|q\Rightarrow N(\pi)|N(q)=q^2$ therefore
$N(\pi)=1,q$ or $q^2$.

$N(\pi\neq1\ \pi$ is prime $N(\pi)\neq q$ by Fermats theorem
therefore $N(\pi)=q^2$ therefore $\pi$ is associated to $q$.

\item[(iii)]
$p\equiv1\ (4)\\ p=(a+ib)(a-ib)\ \textrm{(Fermat)}
=-i(a+ib)(b+ia)$

$a+ib,\ b+ia$ are both $g$-prime as their norms are equal to $p$.

\end{description}


\item[Theorem]
Suppose $n>1$ and suppose $n=2^rp_1^{s_1}\ldots
p_\mu^{s_\mu}q_1^{t_1}\ldots q_\nu^{t_\nu}$ where $p_i\equiv1$ mod
4 $q_i\equiv -1$ mod 4.

If $r(n)$ is the number of representations of $n$ as a sum of two
squares then

$r(n)=\left\{\begin{array}{cl}0&\textrm{if the $t$'s are not all
even}\\4(s_1+1\ldots(s_\mu+1)&\textrm{is the $t$'s are all even}
\end{array}\right.$

\item[Note]
If $X(d)=\left\{\begin{array}{ccc}=1&d\equiv1&(4)\\
-1&d\equiv-1&(4)\\0&d\equiv 0&(2)\end{array}\right.$ then
$r(n)=4\sum_{d|n}X(d)$ so

$r(n)\leq4d(n)$

\item[Proof]
We look for the number of $G$-integers for which $N(\alpha)=n$

Now
$n=\varepsilon(1+i)^{2r}\pi_1^{s_1}{\pi'}_1^{s_1}\ldots\pi_{\mu}^{s_\mu}{\pi'}_{\mu}^{s_\mu}q_1^{t_1}\ldots
q_\nu^{t_\nu}$

Since $2=-i(1+i)^2$ and $p\equiv 1\ (4)\Rightarrow p=\pi\pi'$.

Now suppose $N(\alpha)=n.$ Then $\alpha|n$ since $\alpha|N(\alpha$
therefore $\alpha$ is of the form

\begin{equation}
\alpha=\epsilon_1(1+i)^R\pi_1^{S_1}\pi_1'^{S_1'}\ldots
q_1^{T_1}\ldots
\end{equation}

where $0\leq R\leq 2r\ 0\leq S_1\leq s_1\ 0\leq S_1'\leq
s_1\ldots)\leq T_1\leq t_1\ldots\ (1')$

A number $\alpha$ of the form (1) satisfies

\begin{equation}
N(\alpha)=n\textrm{ i.e. }\alpha\alpha'=n\Leftrightarrow 2R=2r\
S_1+S'_1=s_1\ldots\ 2T_1=t_1\ldots
\end{equation}

Thus the number of $\alpha$ satisfying $\alpha\alpha'=n$ is 4
times the number of $\alpha$ satisfying (2) subject to $(1')\ $(4
choices of $\epsilon_1$)

There are no solutions unless the $t_i$ are all even.

If the $t_i$ are all even then the $T$'s are unique and $R$ is
unique.

For $S_1$ we have $s_1+1$ choices and then $S_1'$ is uniquely
determined. Therefore the number of choices is
$(s_1+1)(s_2+1)\ldots(s_{\mu}+1)$ therefore
$r(n)=4(s_1+1)(s_2+1)\ldots(s_\mu+1)$.

\end{description}

\end{document}
