\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{8.9in}

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf 
  Mersenne Primes in Real Quadratic Fields}
\vskip 1cm
\large Sushma Palimar and B. R. Shankar\\
Department of Mathematical and Computational Sciences \\
National Institute of Technology Karnataka, Surathkal\\
Mangalore\\
India\\
\href{mailto:sushmapalimar@gmail.com}{\tt sushmapalimar@gmail.com}\\
\href{mailto:shankarbr@gmail.com}{\tt shankarbr@gmail.com}\\
\end{center}

\vskip .2in

\begin{abstract}
The concept of Mersenne primes is studied in  real quadratic fields with 
class number one. 
Computational results are given. The field $\mathbb{Q}(\sqrt{2})$ is studied in detail with a focus on 
representing Mersenne primes in the form $x^{2}+7y^{2}$. It is also
proved  that
 $x$ is divisible by $8$ and $y\equiv \pm 3$ (mod ${8}$), generalizing
a result of F. Lemmermeyer, first proved by H. W. Lenstra and P.
Stevenhagen using Artin's reciprocity law.
\end{abstract}


 \section{Introduction}
It is well known that $a^{d}-1$ divides $a^{n}-1$ for each divisor $d$ of $n,$ and if $n=p$, a prime,
 then \begin{equation*} 
                         a^{p}-1=(a-1)(1+a+a^{2}+\cdots+a^{p-1})
                        \end{equation*}
and if  $a^{p}-1$ is a prime, then $a=2$.
Number theorists of all persuasions have been fascinated by prime numbers of the form $2^{p}-1$ ever since 
 {Euclid}  used them for the construction of perfect numbers. In modern times, they are named after 
{Marin Mersenne} (1588-1648).
A well known result due to Euclid is that, if $2^{p}-1$ is a prime then $2^{p-1}(2^{p}-1)$ is perfect.
Much later Euler proved the converse,  every even-perfect number has this form. 

Mersenne primes have been studied 
by amateurs as well as specialists. Mersenne primes are used in cryptography too in generating pseudorandom numbers.
 By far, the most widely used technique  for pseudorandom number generation is an algorithm first proposed by Lehmer, known 
as the linear congruential method.  It is generated by the recursion $X_{n+1} \equiv aX_{n}$ (mod $M_{31}$),
 where $M_{31}$
is the Mersenne prime $2^{31}-1.$ Of the more than two billion choices for $a$, only a handful of multipliers are useful. 
One such value is $a=7^{5}=16807,$ which was originally designed for use in the IBM 360 family of computers,
 Stallings~\cite{WS}. 

On March 3, 1998, the birth centenary of  {Emil Artin } was celebrated at the Universiteit van Amsterdam. 
The paper  Lenstra and Stevenhagen~\cite{LS}  is based on two lectures given on the occasion. We quote 
from  Lenstra and Stevenhagen~\cite{LS}: 
``Artin's reciprocity law is one of the cornerstones of \textit{class field theory.} 
To illustrate its usefulness in elementary number theory, we shall apply it to prove a recently observed property of
Mersenne
primes.'' The property of Mersenne primes referred to is the following:
 if $M_{p}=2^{p}-1$ is prime and $p\equiv 1$ (mod ${3}$), 
then $M_{p}=x^{2}+7y^{2}$ for some integers $x,y$ and one always has 
$x\equiv 0$ (mod ${8}$) and $y\equiv \pm 3$ (mod ${8}$). 
This was first observed by {Franz Lemmermeyer}. 

Many have attempted to generalize the notion of Mersenne primes
 and even-perfect numbers to complex quadratic fields 
with class number 1. One reason is that they have only finitely 
many units. Indeed, with the exception of $\mathbb{Q}(\sqrt{-1})$
and $\mathbb{Q}(\sqrt{-3})$, the other seven complex quadratic fields 
with class number 1 have only two units,   $\pm1$.
 Spira~\cite{RS}  defined Mersenne primes over $\mathbb{Q}(\sqrt{-1})$
 to give a useful definition of even-perfect 
numbers over $\mathbb{Z}[i]$, the ring of Gaussian integers. His work 
was continued later 
by    McDaniel~\cite{WM,WL} to give an
analogue of  {Euclid-Euler} theorem over $\mathbb{Q}(\sqrt{-1})$ and $\mathbb{Q}(\sqrt{-3})$.
In both the papers the concept of Mersenne primes is used to give a 
valid definition of even-perfect numbers.

Recently Berrizbeitia and Iskra~\cite{BI}  studied Mersenne primes 
over Gaussian integers and 
Eisenstein integers. The  primality of Gaussian Mersenne numbers and 
Eisenstein Mersenne numbers are tested using 
 biquadratic reciprocity  and
cubic reciprocity laws respectively. 

In this paper the concept of Mersenne primes is studied in 
real quadratic fields 
$\mathbb{K}=\mathbb{Q}(\sqrt{d})$  with class number 1, so that unique
factorization holds and irreducibles are always prime.

We denote the ring of integers of $\mathbb{K}$ by  ${\cal O_{K}}$, 
 
\begin{equation*}
{\cal O_{K}} = 
 \begin{cases}  \mathbb{Z}[\sqrt{d}], &     \text{ if } 
d \equiv 2,3\  ({\rm mod}\ 4); \\     

 \mathbb{Z}[\frac{1+\sqrt{d}}{2}], &  \text{ if } 
d\equiv 1\ ({\rm mod}\ 4). 
 \end{cases} 
\end{equation*}

 Since $\mathbb{K}$ is a unique factorization domain, 
irreducibles  are primes  in these domains.
 Hence for any $\eta$ $\in$ $\mathbb{K}$ 
the two factorings  
\begin{center}
 $\eta  = \pi_1^{k_1}\pi_2^{k_2}\cdots \pi_r^{k_r} $ and 
$\eta = \epsilon_1 \pi_1^{k_1}\epsilon_2 \pi_2^{k_2} \cdots  \epsilon_r \pi_r^{k_r}$
\end{center}
are considered to be one and the same, where $\epsilon_i$ are 
units and $\pi_i$ are irreducibles. 
 
We define $M_{p,\alpha}=\frac{\alpha^{p}-1}{\alpha-1}\,$ such that
$\alpha \in \mathcal{O_{K}}$ is irreducible and $u=\alpha-1$ is a 
unit other than $\pm 1$.
Then  $M_{p,\alpha}$ may be called as  an analog of Mersenne prime 
if the norm of 
$M_{p,\alpha}$ namely $N(M_{p,\alpha})=N(\frac{\alpha^{p}-1}{a-1})$
is a rational prime. Condition for the irreducibility of $  \alpha=1+u \in  {\cal O_{K}}$  such 
that $\alpha-1$ is a unit (other than $\pm 1$) is  derived
 in the next section.
For this we study the case $N(\alpha-1)=N(u)=\pm 1$ separately. 
We also give a list 
of such quadratic fields and a few Mersenne primes in those fields.
 Computational results show that, among real quadratic 
 fields, Mersenne primes in $\mathbb{Q}(\sqrt{2})$ have a 
definite structure. 

The special property of the usual 
Mersenne primes observed by   
{Franz Lemmermeyer} and proved in  Lenstra and Stevenhagen~\cite{LS}   
admits a generalization to 
Mersenne primes over $\mathbb{Q}(\sqrt{2})$. This property appears to
 be special only to   $\mathbb{Q}(\sqrt{2})$.
Some interesting properties of Mersenne primes 
 and recent  primality tests to check the primality of   Mersenne
 numbers in $\mathbb{Q}(\sqrt{2})$
are given.
 Also, the usual Mersenne primes  given by $M_{p}=2^{p}-1,$ 
can be  obtained from the field  $\mathbb{K}\,=\,\mathbb{Q}(\sqrt{2})$
 without altering the conditions on   $M_{p,\alpha}$. 

\section{Basic Results}
Below we consider various cases under which $\alpha$ is irreducible.

\begin{theorem}\label{th1}
  Let $d\equiv 2,3\ ({\rm mod}\ 4)$ and $N(\alpha-1)=-1$. Then $\alpha$
 is irreducible if and only if $d=2$ and 
$u\in \{1+\sqrt{2},\,1-\sqrt{2},\,-1+\sqrt{2},\,-1-\sqrt{2} \}$. 
 \end{theorem}
\begin{proof}
 Let  $\alpha$ be  irreducible and $u=a+b\sqrt{d}$. Then $\alpha=(a+1)+b\sqrt{d}$. Hence 
$N(\alpha)= (a+1)^{2}-2b^{2}=N(u)+2a+1= 2a$. 
Since $\alpha$ is irreducible, $2a$ should be a rational prime. Hence $a=\pm1$.
 With $a=1$,  $u=1+b\sqrt{d}$ and 
$ N(u)=-1= 1-b^{2}d$. i.e., $b^{2}d=2$. Since  $d$ is square-free, $d=2$  
and $b=\pm1$.  Similarly 
 with $a=-1$, we get $b=\pm1$ and $d=2$. 

Conversely let $d=2$ and $u=a+b\sqrt{2}$ be any unit in $\mathbb{Q}(\sqrt{2})$. 
Then  $\alpha=(a+1)+b\sqrt{2}$ 
  and $N(\alpha)=(a+1)^{2}-2b^{2}=a^{2}-2b^{2}+2a+1=N(u)+2a+1=2a$, is a rational 
prime, if and only if $a=\pm1$.
As before, we get $b=\pm 1.$
Hence  different choices  of $u$ for which $\alpha$ is irreducible  are respectively,
$1+\sqrt{2},\,1-\sqrt{2},\,-1+\sqrt{2}\,$ and $-1-\sqrt{2}$. As $1+\sqrt{2}$
 is the fundamental unit, 
these values are,
$u,-u^{-1},u^{-1},-u$. Corresponding $\alpha$ values are, 
$2+\sqrt{2},\,2-\sqrt{2},\,\sqrt{2}$ and $-\sqrt{2}$.
\end{proof}

Since $2-\sqrt{2}$ and $-\sqrt{2} $ are the  
conjugates of $2+\sqrt{2}$ and $\sqrt{2}$ respectively,
 we compute $M_{p,\alpha}$
with $\alpha=2+\sqrt{2}$ and $\sqrt{2}$.

For $\alpha=2+\sqrt{2}$ a few Mersenne primes in $\mathbb{Q}(\sqrt{2})$ 
are given below:

 \begin{table}[H]
 \centering
\begin{tabular}{|l|l|l|l|}                                   \hline
  $p$   &$M_{p,\alpha}$                        &$N(M_{p,\alpha})$          \\ \hline
$2$      &$3+\sqrt{2}$                                &$7$                     \\ \hline
$3$       &$9+5\sqrt{2} $                                &$31$                     \\ \hline
$5$         &$97+67\sqrt{2}$                              &$431$  		     \\ \hline
$7$           &$1121+791\sqrt{2}$                               &$5279$                       \\ \hline
$11$           &$152193+107615\sqrt{2}$                            &$732799$ 	               \\ \hline         
\end{tabular}
\caption{Mersenne primes in $\mathbb{Q}(\sqrt{2}).$}
 \end{table}

 The  next three  Mersenne primes are found at $p=73$, with 
\[N(M_{p,\alpha}) = 851569055172258793218602741480913108991,\]
$p=89$  with  \[N(M_{p,\alpha})=290315886781191681464330388772329064268797313023,\]
and at $p=233$ with \[N(M_{p,\alpha}) = 18060475427282023033368001231166441784737806891537 \]
\[806547065314167911959518498581747712829157156517940837234519177963497324543.\]

With $\alpha = \sqrt{2}$,
 $M_{p,\alpha}=\frac{(\sqrt{2})^{p}-1}{\sqrt{2}-1}$. 
Thus $N(M_{p,\alpha})=2^{p}-1$, giving all the usual Mersenne numbers. 

\begin{theorem}\label{th2}
  Let   $d \equiv 1\ ({\rm mod}\ 4) $ and  $\alpha-1=u=\frac{a+b\sqrt{d}}{2}$ be a unit such that,
$N(u)=N(\alpha-1)=-1$. 
Then $\alpha$ is irreducible if and only if   $a$ is a rational prime and $b$ is some  odd integer. 
\end{theorem}
\begin{proof} By hypothesis, $ N(\alpha)= \frac{(a+2)^{2}-db^{2}}{4} = a$, 
since $N(u)=-1$. For $\alpha$ to be irreducible $a$ should be an odd  rational prime.
Indeed if $a=2$ then $u=\frac{2+b\sqrt{d}}{2}$ and $N(u)=\frac{4-db^{2}}{4}= -1 $
$\Rightarrow b^{2}d=8.$ This is impossible since $d \equiv 1$ (mod ${4}$).
 Hence   it is clear that 
$b$ is some odd integer.  Thus the analogs of Mersenne primes  are defined for 
  $d \equiv 1$ (mod ${4}$) whenever   units are of the form  $u= \frac{p+(2n+1)\sqrt{d}}{2}$,
where $n \in \mathbb{Z} $ and $p$ is an odd rational prime.
The  converse is straightforward since the norm of $\alpha$ is $a=p$, a rational prime by assumption.
\end{proof}

Table~\ref{table2} shows the values of  $d \equiv 1$ (mod ${4}$),  $d<500$ for which the class number is 1,
  $N(u)=-1$ and  $\alpha$ is irreducible.
\begin{table}[H]
\centering
\begin{tabular}{|l|l|l|l|}   \hline 
$\mathbb{Q}(\sqrt{d})$              &$u$                           &$\alpha$                             & $N(\alpha)$    \\ \hline
$\mathbb{Q}(\sqrt{13})$          &$(\frac{3+\sqrt{13}}{2})$         &$(\frac{5+\sqrt{13}}{2})$             &$3$           \\ \hline
$\mathbb{Q}(\sqrt{29})$          &$(\frac{5+\sqrt{29}}{2})$          &$(\frac{7+\sqrt{29}}{2})$           &$5$      \\ \hline
$\mathbb{Q}(\sqrt{53})$          &$(\frac{7+\sqrt{53}}{2})$          &$(\frac{9+\sqrt{53}}{2})$           &$7$      \\ \hline
$\mathbb{Q}(\sqrt{149})$          &$(\frac{61+5\sqrt{149}}{2})$          &$(\frac{63+5\sqrt{149}}{2})$           &$61$      \\ \hline
$\mathbb{Q}(\sqrt{173})$          &$(\frac{13+\sqrt{173}}{2})$          &$(\frac{15+\sqrt{173}}{2})$           &$13$      \\ \hline
$\mathbb{Q}(\sqrt{293})$          &$(\frac{17+\sqrt{293}}{2})$          &$(\frac{19+\sqrt{293}}{2})$            &$17$     \\ \hline
\end{tabular} 
\caption{  $d \equiv 1$ (mod ${4}$)  $N(u)=-1$ ; $\alpha$ is irreducible. }
\label{table2}
 \end{table}

\begin{theorem}\label{th3} Let $ d \equiv 2,3\ ({\rm mod}\ 4)$ and $u=a+b\sqrt{d}$ 
be a unit, such that $N(u)=1$. Then $\alpha$ is always reducible.
\end{theorem}
\begin{proof}
By hypothesis, $\alpha=(a+1)+b\sqrt{d}$ and  $ N(\alpha)= 2(1+a)$, which is  prime only if $a=0$,
 which contradicts $N(u)=1$. Hence $\alpha$ is not irreducible.
\end{proof}

\begin{theorem}\label{th4}Let   $d \equiv\ 1\ ({\rm mod}\ 4)$ and 
 $u=\frac{a+b\sqrt{d}}{2}$ be a unit such that $N(u)=1$. 
Then, $\alpha$ is irreducible if and only if  $a+2$ is a
 rational prime  and $b$ is some odd integer.
\end{theorem}

\begin{proof}
By hypothesis, $ N(\alpha)= \frac{(a+2)^{2}-db^{2}}{4} = a+2$, 
since $N(u)=1$. For $\alpha$ to be irreducible
 $a+2$ should be a rational prime. Clearly $a \neq 0$ 
  and $a^{2} \equiv 1$ (mod ${4}$). Since  
 $d \equiv 1$ (mod ${4}$)  it is clear that 
$b$ is some odd integer.  
Thus the analogs of 
Mersenne primes  are defined for 
 $d \equiv 1$ (mod ${4}$)  whenever   units are 
of the form  $u= \frac{a+(2n+1)\sqrt{d}}{2}$,
where $n \in \mathbb{Z} $ and $a+2$ is an  odd rational prime.
Converse is straightforward as in theorem \ref{th2}.
\end{proof}

Table~\ref{table4}  below shows the values of $d \equiv 1$ (mod ${4}$),   $d<500$ for which
the class number is 1,
$N(u)=1$ and  $\alpha$ is irreducible.

\begin{table}[H]
\centering
 \begin{tabular}{|l|l|l|l|}   \hline 
$\mathbb{Q}(\sqrt{d})$              & $u$                           &$\alpha$                             & $N(\alpha)$    \\ \hline
$\mathbb{Q}(\sqrt{21})$        &$\frac{5+\sqrt{21}}{2}$           &$\frac{7+\sqrt{21}}{2}$           &$7$            \\  \hline
$\mathbb{Q}(\sqrt{77})$        &$\frac{9+\sqrt{77}}{2}$           &$\frac{11+\sqrt{77}}{2}$           &$11$        \\ \hline
$\mathbb{Q}(\sqrt{93})$        &$\frac{29+3\sqrt{93}}{2}$         &$\frac{31+3\sqrt{93}}{2}$           &$31$         \\ \hline
$\mathbb{Q}(\sqrt{237})$       &$\frac{77+5\sqrt{237}}{2}$        &$\frac{79+5\sqrt{237}}{2}$         &$79$       \\ \hline   
$\mathbb{Q}(\sqrt{437})$       &$\frac{21+\sqrt{437}}{2}$         &$\frac{23+\sqrt{437}}{2}$         &$23$        \\ \hline
$\mathbb{Q}(\sqrt{453})$       &$\frac{149+7\sqrt{453}}{2}$       &$\frac {151+7\sqrt{453}}{2}$       &$151$     \\ \hline
\end{tabular} 
\caption{ $d \equiv 1$ (mod ${4}$); $N(u)=1$; $\alpha$ is irreducible. }   
\label{table4}
\end{table}

As an illustration we consider the following table.
\begin{table}[H]
\centering
 \begin{tabular} {|l|l|l|l|}   \hline
 $p$       &$N(M_{p,\alpha})$   \\ \hline
 $17$       &$223358425353211 $ \\ \hline
 \end{tabular} 
  \caption{ Mersenne primes in  $ \mathbb{Q}(\sqrt{21}),\,u=\frac{5+\sqrt{21}}{2}$.}     
\end{table}
The next Mersenne prime is found at $p=47$.

Similar calculations are obtained for $\mathbb{Q}(\sqrt{77})$, the fundamental unit is $u=\frac{9+\sqrt{77}}{2}$ 
and $\alpha=\frac{11+\sqrt{77}}{2}.$

\begin{table}[H]
\centering
\begin{tabular}{|l|l|l|l|}   \hline
$p$         &$N(M_{p,\alpha})$                \\ \hline
$2$         &$23 $                    \\ \hline 
$7$         &$10248701 $           \\ \hline 
\end{tabular}
\caption{Mersenne primes in $ \mathbb{Q}(\sqrt{77}), \,u=\frac{9+\sqrt{77}}{2}$.}
\end{table}

The next Mersenne prime is found at $p=71$.

The values of $u$ for Tables~\ref{table2} and \ref{table4} are taken from Cohen~\cite{cohen}.

\subsection{Observations}
  \begin{enumerate}
\item In  Tables~\ref{table2}  and  \ref{table4} above, we have chosen only the fundamental unit
$u$ in $\mathbb{Q}(\sqrt{d})$. However it is possible that $\alpha=1+u$ is not irreducible with $u$ as 
fundamental unit and yet 
$\alpha^{\prime}=1+u^{\prime}$ is irreducible for some other unit $u^{\prime}$ in $\mathbb{Q}(\sqrt{d})$.

As an illustration we consider $\mathbb{Q}(\sqrt{5})$. Here $u=\frac{1+\sqrt{5}}{2}$ is the fundamental unit. But, 
$\alpha=1+u=\frac{3+\sqrt{5}}{2}=u^{2}$ is again a unit! However, with $u^{\prime}=u^{2}=\frac{3+\sqrt{5}}{2}$, we get
$\alpha^{\prime}=1+u^{\prime}=\frac{5+\sqrt{5}}{2}$ and $N(\alpha^{\prime})=5$, so $\alpha^{\prime}$ is irreducible. Another
choice is $u^{5}=u^{''}=\frac{11+5\sqrt{5}}{2}$ and $\alpha^{''}=1+u^{''}=\frac{13+5\sqrt{5}}{2}$ 
is irreducible since $N(\alpha^{''})=11$.
\item Theorems \ref{th1} and \ref{th3} imply the following: Among all fields $\mathbb{Q}(\sqrt{d})$,
 $d\equiv 2,3$ (mod ${4}$)
$\mathbb{Q}(\sqrt{2})$ is the only field where $ \alpha=1+u$ is irreducible. There are essentially  only two choices 
for $\alpha$,
namely $\sqrt{2}$ and $2+\sqrt{2}$. 
\end{enumerate}
Similar to usual Mersenne primes in $\mathbb{Z}$, quadratic Mersenne norms have the following properties:
\subsection{Properties of \texorpdfstring{$N(M_{p,\alpha})$}{N(Mp,a)}}
\begin{enumerate}
\item If $N(M_{n,\alpha})$ is prime, then $n$ is prime.
\item The sequence $\{N(M_{n,\alpha})\}_{n=1}^{\infty}$ is an increasing sequence of integers that starts at $1.$
\item If $d$ divides $n$ then $M_{d,\alpha}$ divides $M_{n,\alpha}$ in $\mathbb{Q}(\sqrt{d})$ and $N(M_{d,\alpha})$
 divides $N(M_{n,\alpha})$.
\item If $d$ and $n$ are relatively prime then $M_{d,\alpha}$ is relatively prime to $M_{n,\alpha}$   in 
$\mathbb{Q}({\sqrt{d}})$ 
and $N(M_{n,\alpha})$ is relatively prime to $N(M_{d,\alpha})$.
\end{enumerate}
Experimental evidence shows that Mersenne primes are  sparse in $\mathbb{Q}(\sqrt{d})$ for $d \equiv 1$ (mod ${4}$).
Some interesting properties of Mersenne primes in $\mathbb{Q}(\sqrt{2})$ are given below.
\subsection{Properties of \texorpdfstring{ $N(M_{p,\alpha})$ in $\mathbb{Q}(\sqrt{2})$} {N(Mp,a) in Q({2}}} 
\begin{enumerate}
\item Since $\alpha=1+u\,=\,2+\sqrt{2}\,=\,u\sqrt{2}$, where $u$ is the fundamental unit, we have
$ \alpha^{n}=a_{n}+b_{n}\sqrt{2}=u^{n}(\sqrt{2})^{n},$ for any integer $n>0$
 and $a_{n},b_{n}\in \mathbb{Z}$.  A small calculation also reveals that
\begin{equation*}
\alpha^{n}=   
\begin{cases} (2^{\frac{n-1}{2}}\sqrt{2})u^{n}, & \text{ if }   n  \text{ is   odd};\\
2^{\frac{n}{2}}u^{n}, &  \text{ if } n   \text{ is  even}.\\
 \end{cases}  
\end{equation*}

Rewriting this,
\begin{equation*}
\alpha^{n}=   \begin{cases} 
(2^{\frac{n-1}{2}}\sqrt{2}) (v_{n}+w_{n}\sqrt{2}), & \text{ if }  n 
\text{ is odd}, \; w_{n}, v_{n}\in \mathbb{Z}; \\
2^{\frac{n}{2}}(v_{n}^{\prime}+w_{n}^{\prime}\sqrt{2}), &  \text{ if } n  \text{ is even},\;
 v_{n}^{\prime},w_{n}^{\prime}\in \mathbb{Z}.
  \end{cases}  
\end{equation*}

It can be noted that $w_{n}$, the coefficient of $\sqrt{2}$ in $u^{n}$ is odd if $n$ is odd.
 Further, $\,2^{\frac{n+1}{2}}w_{n}=a_{n}$ 
and $2^{\frac{n-1}{2}}v_{n}=b_{n}$.

And $w_{n}^{\prime}$, the coefficient of $\sqrt{2}$
in $u^{n}$ is even if $n$ is even. Further, 
 $2^{\frac{n}{2}}v_{n}^{\prime}=a_{n}\;$
 and $\;2^{\frac{n}{2}}w_{n}^{\prime}=b_{n}$.
 
For $n$ odd, we have $ N(u)^{n}=-1$, so \[N(\alpha^{n})=N(2^{\frac{n-1}{2}}\sqrt{2})N(u)^{n}=
N(2^{\frac{n-1}{2}})N(\sqrt{2}) (-1)^{n}=2^{n-1}(-2)(-1)\,=\,2^{n}.\]
For $n$ even,  $ N(u)^{n}=1$, and  \[N(\alpha^{n})=N(2^{\frac{n}{2}})N(u)^{n}=N(2^{\frac{n}{2}})( 1)=2^{n}. \]
\item For any odd prime $p,$ let $\alpha^{p}= (2^{\frac{p-1}{2}}\sqrt{2}) (v_{p}+w_{p}\sqrt{2})$.
 
Then 
\begin{eqnarray*}
N(\alpha^{p}-1) &=& (2^{\frac{p+1}{2}}w_{p}-1)^{2}-2(2^{\frac{p-1}{2}}{v_{p}})^{2} \\
&=& (2^{p+1}{w_{p}}^{2}+1-2^{\frac{p+3}{2}}w_p)-2^{p}{v_p}^{2}  \\
&=& 2^{p}(2{w_{p}}^{2}-{v_p}^{2})-2^{\frac{p+3}{2}}w_p +1 \\
&=& 2^{p} -2^{\frac{p+3}{2}}w_p +1.
\end{eqnarray*}
  Thus,
 \[N(M_{p,\alpha})=\, 2^{\frac{p+3}{2}}w_{p}-2^{p}-1. \]     
    
\item As already pointed out, $a_{p}$ has a factor of $2^{\frac{p+1}{2}}$.
Hence $2a_{p}\equiv 0$ (mod ${4}$). 
This further implies that, $N(M_{p,\alpha})\equiv -1$ (mod ${4}$) for $p\geq2$ 
and $N(M_{p,\alpha})\equiv -1$ (mod ${8}$) for $p>2.$

The next three properties are consequences of quadratic reciprocity, and $\left(\frac{\cdot}{\cdot}\right)$ 
denotes the $Legendre$ symbol. 
\item 
 Let $p$ be an odd prime and $p\equiv \pm 1$ (mod ${8}$. Then

 \begin{displaymath}2^{\frac{p+3}{2}}=2^{2}2^{\frac{p-1}{2}}\equiv 4\pmod{p}.\end{displaymath}
If $p\equiv \pm 3$ (mod ${8}$), then  
\begin{displaymath}  2^{\frac{p+3}{2}}=2^{2}2^{\frac{p-1}{2}}\equiv -4\pmod{p}.\end{displaymath} 
Combining the above we get
\begin{equation*}
N(M_{p,\alpha}) \equiv 
  \begin{cases}  4w_{p}-3  \ {\rm (mod\ } p), &      \text{ if } 
  p \equiv \pm 1\ ({\rm mod} \ 8);
\\
 -4w_{p}-3   \ {\rm (mod\ } p) , &  \text{ if } p \equiv \pm 3\  
 ({\rm mod } \ 8). 
 \end{cases}  
\end{equation*}
\item  
If $N(M_{p,\alpha})$ is a rational prime and $q$ is any other prime
 then \begin{equation*}
\left(\frac{N(M_{p,\alpha})}{q}\right)\left(\frac{q}{N(M_{p,\alpha})}\right)= 
  \begin{cases} 
 1,   & \text{ if  } q\equiv 1\ ({\rm mod } \ 4);
\\
 -1, &   \text{ if } q\equiv 3\  ({\rm mod } \ 4).
 \end{cases}
\end{equation*}

\item If $N(M_{p,\alpha})$ is a rational prime then $\left( \frac{2}{N(M_{p,\alpha})}\right)=1$ since  
$N(M_{p,\alpha})\equiv -1$  (mod ${8}$).
Hence 
\mbox{$\sqrt{2} \in \mathbb{F}_{N(M_{p,\alpha})}$} the finite field with \mbox{$N(M_{p,\alpha})$} elements.
\end{enumerate}

\section{Testing for primality}
Several primality tests are available and some are specially designed for special numbers, an example  
being the famous Lucas-Lehmer test for the usual Mersenne primes. 
We show that the generalized Mersenne numbers of $\mathbb{Q}(\sqrt{2})$ can be put in a special form, so that, 
recent primality tests can be used to determine 
whether they are prime.
Now,
 \[N(M_{p,\alpha})= \,2^{\frac{p+3}{2}}w_{p}-2^{p}-1,\]
or
\[N(M_{p,\alpha})=2^{\frac{p+3}{2}}(w_{p}-2^{\frac{p-3}{2}})-1.\]
Since $w_{p}$ is odd, $(w_{p}-2^{\frac{p-3}{2}})$ is odd for $p>3.$

For  $ p>3,$ \[ N(M_{p,\alpha})=h.2^{\frac{p+3}{2}}-1, \quad  where \quad h=(w_{p}-2^{\frac{p-3}{2}}), \quad odd. \] 
  An algorithm to test the primality of numbers of the form  
$h\cdot2^{n}\pm1$, for any odd integer $h$ such that, $h\neq 4^{m}-1$ for any $m$ is described in Bosma~\cite{BW}. 
It can be noted that, $h$ is not equal to $4^{m}-1$ in $M_{p,\alpha}$ for any $m$.
 Hence this algorithm  can be used to test 
the primality of $M_{p,\alpha}$. 
\section{Primes of the form \texorpdfstring{$x^{2}+7y^{2}$}{x2+7y2}} 
 The problem of representing a prime number by the form $x^{2}+ny^{2}$, where $n $ is any fixed positive integer
dates back to Fermat.
This question was best answered by $Euler$ who spent $40$ years in  proving Fermat's theorem and thinking about 
how they can be generalized, he  proposed some conjectures concerning $p=x^{2}+ny^{2}$, for $n>3$.
These remarkable
conjectures, among other things, touch on quadratic forms and their composition, genus theory, 
cubic and biquadratic reciprocity. Refer Cox~\cite{DC} for a thorough treatment.

Euler became intensely interested in this question in the early 1740's and he mentions numerous examples in his letters
to Goldbach. One among several of his conjectures stated in modern notation is 
\begin{displaymath}
 \left(\frac{-7}{p}\right)=1\Longleftrightarrow p\equiv 1,9,11,15,23,25 \pmod{28}.
\end{displaymath}
The following lemma gives necessary and sufficient condition for a number $m$ to be 
represented by a form of discriminant $D$.
\begin{lemma}
 Let $D\equiv 0,1$ (mod ${4}$) and $m$ be an integer relatively prime to $D.$ Then $m$ is properly 
represented by a primitive form of discriminant $D$ if and only if $D$ is a quadratic residue modulo $m$. 
\end{lemma}
As a corollary, we have the following:
\begin{corollary}
 Let $n$ be an integer and $p$ be an odd prime not dividing $n.$ Then \(\left(\frac{-n}{p}\right)=1\) if and only if $p$
is represented by a primitive form of discriminant $-4n.$
\end{corollary}
In 1903, Landau proved a conjecture of Gauss (theorem \ref{th7} below).

Let $h(D)$ denote the number of classes of primitive positive definite forms of discriminant $D$, i.e.,
$h(D)$ is equal to the number of reduced forms of discriminant $D$. 
 \begin{theorem}\label{th7}
 Let $n$ be a positive integer. Then \begin{center}
                                      $h(-4n) =1 \Leftrightarrow n= 1,2,3,4\,\,or\, 7$.
                                     \end{center}
\end{theorem}
One may note that, $x^{2}+ny^{2}$ is always a reduced form with discriminant $-4n.$

In this paper we consider the  case  $n=7$ and  represent $N(M_{p,\alpha})$ 
in the form $x^{2}+7y^{2}$ whenever  $M_{p,\alpha}$ is a Mersenne prime in $\mathbb{Q}(\sqrt{2})$.

$x^{2}+7y^{2}$ is the only reduced form of discriminant $-28$, and it follows that

\begin{displaymath}
 p\,= \, x^{2}+7y^{2} \Longleftrightarrow p\equiv 1,9,11,15,23,25\pmod{28}.
\end{displaymath}
for primes $p\neq 7$.
 
 The special  property of the usual Mersenne primes over $\mathbb{Z}$ referred 
to in the beginning,  Lenstra and Stevenhagen~\cite{LS}, 
has the following generalization over $\mathbb{Q}(\sqrt{2})$: 

\begin{theorem}\label{main-th}
  If $N(M_{p,\alpha})$ is a rational prime, with $\alpha=2+\sqrt{2}$, then
 $N(M_{p,\alpha})$ is always a quadratic residue  $\pmod{7}$, and hence it can be 
written as $x^{2}+7y^{2}$. Also, $x$ is  divisible 
by $8$, and  $y \equiv \pm 3 \pmod{8}$.
\end{theorem}
The detailed proof is given in Palimar~\cite{thes}, using Artin's reciprocity law.

Here we prove the theorem in two stages:
first we show that $N(M_{p,\alpha})$ is always a quadratic residue  (mod ${7}$).
Next, we  give an outline of the proof that $x$ is  divisible 
by $8$, and  $y \equiv \pm 3$ (mod ${8}$).  

The first few 
Mersenne primes in $\mathbb{Q}(\sqrt{2})$ with $\alpha=2+\sqrt{2},$ as well as the representations of their norms
as $x^{2}+7y^{2}$ is given in Table~\ref{table7}.

\begin{table}[H]
\centering
\begin{tabular}{|l|l|l|l|}                                   \hline
 $p$           &$M_{p,\alpha}$   &$x^{2}+7y^{2}$       \\ \hline
$5$               &$431$  		&$16^{2}+7\cdot5^{2}$                 \\ \hline
$7$            &$5279$                &$64^{2}+7\cdot13^{2}$                    \\ \hline
$11$             &$732799$ 	       &$856^{2}+7\cdot3^{2}$                     \\ \hline         
\end{tabular}
\caption{Norms of Mersenne primes in $\mathbb{Q}(\sqrt{2})$ in the form   $x^{2}+7y^{2}$. }
\label{table7}
\end{table}

  For $p=73$, \[ N(M_{p,\alpha})=851569055172258793218602741480913108991 =\]
\[(28615996544447548272)^{2}+7\cdot(2161143775888286749)^{2}\] 
  For $p=\,89$,  \[N(M_{p,\alpha}) = 290315886781191681464330388772329064268797313023 =\]
\[(363706809248848497658560)^{2}+7\cdot(150253711001099458172317)^{2}\]
 For $p=\,233$, \[ N(M_{p,\alpha})=
1806047542728202303336800123116644178473780689153780654706531416\]
\[7911959518498581747712829157156517940837234519177963497324543.\] 
The corresponding representation is 
\[(86527345603258677818378326573842407929031070590321223524182584)^{2} +\]
\[7\cdot(38865140256563104639356290982349294477380709218952585423373629)^{2}.\]
 
We now show that, if $N(M_{p,\alpha})$ is a prime then, $N(M_{p,\alpha})$ can be written as $x^{2}+7y^{2}$.

Since $N(M_{p,\alpha})= 2^{\frac{p+3}{2}}w_{p}-2^{p}-1,$ representing a prime in the form $x^{2}+7y^{2}$
depends on $w_{p}$. Now, we find the values of $v_{p}$ and $w_{p}$ (mod ${7}$).

As we know, for any odd  $n$, $N(u^{n})\,=\,v_{n}^{2}-2 w_{n}^{2}\,=-1$. 

If $u^{n}=v_{n} +w_{n}\sqrt{2}$, then $v_{n}$ and $w_{n}$ satisfy the following recursions:

  $v_{n+1}=v_{n}+2w_{n}$ and $w_{n+1}=v_{n}+w_{n}$, with  initial conditions  $v_{1}=1,\,w_{1}=1$.

The above recursions can be used to show that $v_{n}$ and $w_{n}$ satisfy the following:

\begin{equation*}
 v_{n+2}=3v_{n}+4w_n \, ,\, w_{n+2}=2v_n+3w_n;
\end{equation*} 

\begin{equation*}
 v_{n+3}=7v_n+ 10w_n \, , \, w_{n+3}=5v_n+10w_n;
\end{equation*}

\begin{equation*}
v_{n+4}=17v_n+24w_n \,,\,w_{n+4}=12v_n+17w_n;
\end{equation*}

\begin{equation*}
v_{n+5}=41v_n+58w_n \,,\, w_{n+5}=29v_n+41w_n;
\end{equation*}

\begin{equation*}
v_{n+6}=99v_n+140w_n \,,\, w_{n+6}=70v_n+99w_n;
\end{equation*}

From the above one may also easily obtain the following congruences:
\begin{equation*}
 \{v_{6k+1}\}\equiv1 \pmod{7} \; ,\;\{w_{6k+1}\}\equiv1 \pmod{7};
\end{equation*}

\begin{equation*}
 \{v_{6k+5}\}\equiv6 \pmod{7}\; ,\; \{w_{6k+5}\}\equiv1 \pmod{7}.
\end{equation*}

Since only odd prime powers greater than $3$ are considered, we have listed only
 the congruences for indices congruent to $\pm 1 \pmod{6}$.

Hence \begin{equation} \label{eq2}
 N(M_{p,\alpha})=2^{\frac{p+3}{2}}w_{p}-2^{p}-1\equiv 2^{\frac{p+3}{2}}- 2^{p}-1 \pmod{7}.
\end{equation}
Let us solve equation (\ref{eq2}) for $p>3$.

If $p=3k+1$ then, $2^{p}\equiv 2 \pmod{7}$ and $2^{\frac{p+3}{2}}\equiv 4 \pmod{7}$,  
so\begin{displaymath}N(M_{p,\alpha})\equiv 1 \pmod{7}.\end{displaymath}

If $p=3k+2$ then, $2^{p}\equiv 4 \pmod{7}$ and $2^{\frac{p+3}{2}}\equiv 2 \pmod{7}$,
 so  \begin{displaymath}N(M_{p,\alpha})\equiv 4\pmod{7}.\end{displaymath} 

Thus in both cases $N(M_{p,\alpha})$ can always be represented as $x^{2}+7y^{2}$.

 To prove   theorem \ref{main-th} we need the following lemma.
\begin{lemma}
 If $N(M_{p,\alpha})$ is a 
rational prime and $N(M_{p,\alpha})=x^{2}+7y^{2}$, 
then $x\equiv 0 \pmod {4}$, and $y\equiv \pm 3 \pmod {8}$. 
\end{lemma}
\begin{proof}
From the previous discussion, we know \begin{equation} \label{lem-eq}
                                       N(M_{p,\alpha})=x^{2}+7y^{2}.
                                      \end{equation}
But  $N(M_{p,\alpha})=2^{\frac{p+3}{2}}w_{p}-2^{p}-1.$
Clearly we may take $p>6$. So either $p=6k+1$ or $p=6k+5$.

If $p=6k+1$, then 
\begin{equation} \label{lem-eq1}
N(M_{p,\alpha})=2^{\frac{6k+4}{2}}w_p-2^{6k+1}-1\, \equiv -1 \equiv 7\pmod{8}. \end{equation}
 If $p=6k+5$,   then also,
\begin{equation} \label{lem-eq2}N(M_{p,\alpha})=2^{\frac{6k+5}{2}}w_p-2^{6k+5}-1\equiv 7\pmod{8}.\end{equation}
But right hand side  of equation (\ref{lem-eq}) is
$x^{2}+7y^{2}$. We show that $x$ must be even and $y$ odd.

 For, if $x$ is odd and $y$ is even, then 
$x^{2}\equiv 1$ (mod ${8}$) and
either $y^{2}\equiv 0$ (mod ${8}$) or $y^{2}\equiv 4$ (mod ${8}$). If  $y^{2}\equiv 0$ (mod ${8}$), 
then $x^{2}+7y^{2}\equiv 1$ (mod ${8}$)
contradicting equations (\ref{lem-eq1}) and (\ref{lem-eq2}); and if $y^{2}\equiv 4$ (mod ${8}$), 
then 
\begin{displaymath}x^{2}+7y^{2}\equiv 1+7.4\equiv 5\pmod{8},\end{displaymath}
again contradicting equations (\ref{lem-eq1}) and (\ref{lem-eq2}).
Thus $x$ is even and $y$ is odd. 

Hence  by equation (\ref{lem-eq}) 
                     \begin{displaymath}
                                7\equiv x^{2}+7y^{2}\equiv x^{2}+7\pmod{8},  
                              \end{displaymath}
since $y^{2}\equiv 1$  (mod ${8}$) and so, $x^{2}\equiv 0$ (mod ${8}$) implying $x\equiv 0$ (mod ${4}$).

We now prove that $y\equiv \pm3$ (mod ${8}$)

 Let $p\equiv 1$ (mod ${6}$). From  equation (\ref{lem-eq1}) 
\begin{displaymath}
N(M_{p,\alpha})=x^{2}+7y^{2} =2^{\frac{6k+4}{2}}w_p-2^{6k+1}-1.  
 \end{displaymath}
Reducing modulo $16$, we get $N(M_{p,\alpha})\equiv -1$ (mod ${16}$). But $N(M_{p,\alpha})=x^{2}+7y^{2}$ and 
$x\equiv 0$ (mod ${4}$). Hence  $7y^2\equiv -1$ (mod ${16}$), yielding $y^{2}\equiv 9$ (mod ${16}$). This proves that
 $y\equiv \pm3 $ (mod ${8}$). The same result follows from equation(\ref{lem-eq2}) when $p\equiv 5$ (mod ${6}$).
\end{proof}

\begin{proof}[Outline of the proof of Theorem~\ref{main-th}]
We now show that $x\equiv 0$ (mod ${8}$).
Virtually, the proof given in  Lenstra and Stevenhagen~\cite{LS} carries over word-for-word, and so, 
we merely give an outline. 
All details and notation are 
as in  Lenstra and Stevenhagen~\cite{LS}. By definition,  
$N(M_{p,\alpha})=\frac{(2+\sqrt{2})^p-1}{1+\sqrt{2}}. \frac{(2-\sqrt{2})^p-1}{1-\sqrt{2}}.$
 Denote the two factors on the right by $v_p$ and $\bar v_p$. 
It is easy to see that $v_p$ and $\bar v_p$ are both totally 
positive. We compute the Artin symbols of $v_{p}{\mathbb{Z}}_E$ and $\bar v_{p}{\mathbb{Z}}_E$, and show that 
they are both trivial. We need to consider only two cases: $p\equiv 1$ (mod ${6}$) and
$p\equiv 5$ (mod ${6}$).

Since $\sqrt{2}\equiv 3,4$ (mod ${7}$), by taking $\sqrt{2}=4$ in $v_p$ and $\sqrt{2}=3$ in $\bar v_p$,  
a straightforward computation shows that, $v_p\equiv 1$ (mod ${7}$) and $\bar v_p\equiv 1$ (mod ${7}$).
 This completes the proof. 
\end{proof}

 \section{Acknowledgments}
The authors gratefully acknowledge the kind help and encouragement given by Prof.  Chandan Singh Dalawat
during their visit to Harish-Chandra Research Institute, Allahabad, India, in December 2011.
 His lucid explanation of Artin reciprocity and short introduction to Class field theory
was of great help.

\begin{thebibliography}{99}
 
\bibitem{BI} 
Pedro Berrizbeitia and Boris Iskra,  Gaussian and Eisenstein Mersenne primes, \emph{Math. Comp.} {\bf 79}  (2010),  1779--1791.

\bibitem{BW}
 Wieb Bosma,  Explicit primality criteria for $h.2^{k}\pm1$, \emph{Math. Comp.}  {\bf 61}  (1993),   97--109.

\bibitem{cohen}
 Henri Cohen, {\it A Course in Computational Algebraic Number Theory}, Springer-Verlag,   1993.

\bibitem {DC} 
David A. Cox,   {\it Primes of the form $x^{2}+ny^{2}$}, Wiley -Interscience, 1989.

\bibitem{LS}
Hendrik  W. Lenstra and Peter Stevenhagen,  {Artin reciprocity and Mersenne primes}, \emph{Nieuw Arch.   Wiskd. (5)} {\bf 1 }  (2000), 44--54.

\bibitem {WM} Wayne L. McDaniel,  {Perfect Gaussian integers}, \emph{Acta Arith.}  {\bf 25} (1974), 137--144.

\bibitem{WL} 
Wayne L. McDaniel, {An analogue in certain unique factorization domains of the Euclid-Euler theorem on perfect numbers}, \emph{Int. J.  Math.  Math. Sci.} {\bf 13}   (1990), 13--24.

\bibitem{thes} 
Sushma Palimar,  {Computations in $p$-adic discrete dynamics and real quadratic fields}, Ph.D Thesis,   National Institute of Technology Karnataka, Surathkal, India, 2012.  


\bibitem {RS}
 Robert Spira,  {The complex sum of divisors}, \emph{Amer.  Math.  Monthly}    {\bf 68} (1961),  120--124.

\bibitem {WS} 
William Stallings, {\it Cryptography and Network Security: Principles and Practices}, Prentice-Hall, Inc., 2006.



\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary 11R04.

\noindent \emph{Keywords: } Mersenne primes, Artin's reciprocity law.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequence
\seqnum{A033207}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received May 2 2012;
revised version received  May 21 2012.
Published in {\it Journal of Integer Sequences}, June 11 2012.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}

                                                                                

