\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}

\begin{center}
\vskip 1cm{\LARGE\bf On Some Properties of Two Simultaneous \\
\vskip .2cm
Polygonal Sequences} 
\vskip 1cm
\large
Joseph C. Su\\
P. O. Box 710\\
Alhambra, CA 91802\\
USA\\ 
\href{mailto:jsu800@alum.mit.edu}{\tt jsu800@alum.mit.edu} \\
\end{center}

\begin{abstract}
This paper focuses on the properties of integers that are
simultaneously representable as both $m$-gonal and $n$-gonal numbers.
Employing hyperbolic geometry, we ascertain both lower and upper bounds
on these numbers when there is a finite set of these integers. We then
consider the fundamental class of solutions to a generalized
Pell-Diophantine equation that relates to these integers, and derive a
fast algorithm that can be used to generate them.
\end{abstract}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section] 
\newtheorem{definition}{Definition}[section]
\newtheorem{example}[theorem]{Example}
\newtheorem{ex}[corollary]{Example}
\newtheorem{ex-def}[definition]{Example}


\newenvironment{pf}{\noindent{\bf Proof. }}{\hfill $\Box$ \\}



\begin{section}{Introduction}



Polygonal numbers can be represented by a group of dots in arithmetic
progression.  The $r$-th $m$-gonal number can be expressed as

\begin{equation}
\label{polygonal-equation}
f_r^m=\frac{(m-2)r^2-(m-4)r}2.
\end{equation}

\noindent For example, the triangular numbers are $1, 3, 6, 10, \ldots $, \seqnum{A000217} and the square numbers are $1, 4, 9, 16, \ldots$, \seqnum{A000290}. Geometrical language for these numbers is justified in Fig.~\ref{polyfigure}.

\begin{figure}[hbtp]
\centering 
\includegraphics[width=0.7\textwidth]{polygonal}
\caption{Geometrical Representation of Polygonal Numbers}
\label{polyfigure}
\end{figure}

Let  $f^{(m,n)}$ be the set of numbers that are simultaneously representable as both $m$-gonal and $n$-gonal numbers, where $m,n\in 
\mathbb N,$ and let $f_k^{(m,n)},$ be the $k$-th such number.
In other words, there exists integers $r$ and $s$
such that $f_k^{(m,n)}=f_r^{m}\cap f_s^n.
$ Note that $m$ and $n$ are symmetric and henceforth we assume,
without loss of generality, that $n>m$. 

Much of the historical background of polygonal numbers can be found in
books \cite{dickson, gelfond} and the relationship of these numbers was
studied in various articles \cite{ando, eggan, lucas}. In particular,
the equal values of three simultaneous polygonal numbers and some Pell
equations arising from these numbers were studied \cite{krausz}.  In
addition, the proof for the infinitude of $f^{(m,n)}$ can be found in
the literature \cite{chu, chu1, lucas}, i.e., for $(m-2)(n-2)$ not a
perfect square, except when $(m,n)=(3,6),\left| f^{(m,n)}\right|
=\infty$, where $\left| \quad \right|$ represents
cardinality.

The first part of this paper focuses on the case where $\left|
f^{(m,n)}\right|$ is finite and estimates the cardinality of such
integers, employing the techniques from hyperbolic geometry and the
theories from Pell-Diophantine equations, i.e.,

\begin{equation}
\label{pell}
x^2-Dy^2=\Omega 
\end{equation}
with $D=(m-2)(n-2)$ and $\Omega =(m-2)^2(n-4)^2-D(m-4)^2$, arriving at 
$$
1\leq \left| f^{(m,n)}\right| \leq \lfloor \frac{d(\Omega )}2\rfloor -1
$$
where $\Omega = (m-2)^2(n-4)^2 - (m-2)(n-2)(m-4)^2$, $d(\Omega)$
signifies the number of divisors of $\Omega$, and $\lfloor\quad\rfloor$
is the greatest integer function.

The second part of this paper begins with a preliminary discussion on the theory of second-degree Diophantine equations in $\mathbb Q$($\sqrt{D})$. We define our arsenal in the theory and examine the fundamental class of solutions of (\ref{pell}) as Chu recently did \cite{chu1}. More importantly, we improve the lower bound in the solution bounds given by Nagell \cite{nagell} regarding the solutions of a generalized Pell's equation. The improved bounds lead to the systematic determination of solutions under two special circumstances, i.e., (a) $f^{(m,m+2)}$ and (b) $f^{(m,m+1)}$, where $m\geq 5$. The result is a formula for directly ascertaining $f^{(m,n)}_k$, where $k=1, 2, 3, \cdots$ and $n=m+1$ or $n=m+2$. We establish a few corollaries to illustrate the application of this algorithm. This systematic approach can be readily extended to other algebraic cases. 

\end{section}

\begin{section}{When $\left| f^{(m,n)} \right|$ is Finite}
 Chu \cite{chu} and Lucas \cite{lucas} considered the case when {\bf $\left| f^{(m,n)}\right| =\infty$}. That is, for {\bf $\left| f^{(m,n)}\right|$} to be otherwise finite, we must have $(m-2)(n-2)$ be a perfect square, and $(m,n)\neq (3,6)$.

Using (\ref{polygonal-equation}) and the fact for every $k$, $\exists r, s\in \mathbb N$, such that $f_k^{(m,n)}=f_r^{m}\cap f_s^n$, we obtain the equation

\begin{equation}
\label{m-n-equation}
f^{(m,n)}_k = f^m_r \cap f^n_s = \frac{(m-2)r^2 - (m-4)r}{2} = \frac{(n-2)s^2 - (n-4)s}{2} 
\end{equation}
or, with a little bit of rearrangement,

\begin{equation}
\label{s-equation}
s = \frac{(n-4) \pm\sqrt{(n-4)^2 + 4r(n-2)[(m-2)r-(m-4)]} }{2(n-2)}
\end{equation}
Since $s\in \mathbb N$, the discriminant of the last equation is a square integer. In other words, $\exists q \in \mathbb N$, such that
$$
(n-4)^2 + 4r(n-2)[(m-2)r - (m-4)] = q^2
$$
To rearrange (\ref{s-equation}) into a Pell equation of the form in
(\ref{pell}), we multiply the above equation pairwise by $(m-2)^2$,
arriving at

\begin{equation}
\label{var-representation}
\left\{ 
\begin{array}{l}
x = (m-2)q \\ 
y = 2r(m-2) - (m-4) \\ 
D = (m-2)(n-2) \\
\Omega = (m-2)^2(n-4)^2 - (m-4)^2(m-2)(n-2)
\end{array}
\right. 
\end{equation}
Since $s \in \mathbb N$, we can rewrite (\ref{s-equation}) into $s=\frac{(n-4)\pm q}{2(n-2)}$, or $q=2s(n-2)\mp(n-4)$, whereas from (\ref{var-representation}), $r=\frac{(m-4)+y}{2(m-2)}$. Note that

\begin{equation}
\label{s-equation2}
s = \left\{
\begin{array}{l}
\frac{(n-4)-q}{2(n-2)},  \quad\text{when} \quad s=0\\
\frac{(n-4)+q}{2(n-2)}, \quad\text{when} \quad s\geq1\\
\end{array}
\right.
\end{equation}
Since $x=(m-2)q = 2s(m-2)(n-2)\mp (m-2)(n-4)$, we can transform $s$ in terms of $x$ into

\begin{equation}
s = \frac{x\pm (m-2)(n-4)}{2(m-2)(n-2)}.
\end{equation}
Thus, for every $r, s \in \mathbb N$, we must have

\begin{equation}
\label{r-general-equation}
r = \frac{(m-4)+y}{2(m-2)}, \quad\text{when} \quad r = 0, 1, 2,\cdots
\end{equation}
and

\begin{equation}
\label{s-general-equation}
s = \left\{
\begin{array}{l}
\frac{(n-4)-q}{2(n-2)} = \frac{-x+(m-2)(n-4)}{2(m-2)(n-2)},  \quad\text{when} \quad s=0\\
\frac{(n-4)+q}{2(n-2)} = \frac{x+(m-2)(n-4)}{2(m-2)(n-2)}, \quad\text{when} \quad s\geq1\\
\end{array}
\right.
\end{equation}
In other words,

\begin{equation}
\label{x-equation}
x \equiv \left\{
\begin{array}{l}
+(m-2)(n-4)[\bmod \quad2(m-2)(n-2)], \quad\text{if} \quad s=0.\\
-(m-2)(n-4)[\bmod \quad2(m-2)(n-2)], \quad\text{if} \quad s\geq1.
\end{array}
\right.
\end{equation}
and

\begin{equation}
\label{y-equation}
y \equiv -(m-4)[\bmod \quad2(m-2)], \quad r\geq0.
\end{equation}

We note that (\ref{m-n-equation}) has solutions when either $(r_0, s_0) = (0,0)$ or $(r_1, s_1) = (1,1)$, or, in other words
\begin{equation}
\label{r-s-equation}
(r,s) = \left\{
\begin{array}{l}
(0,0), {\begin{array}{l}x_0 = + (m-2)(n-4)\\y_0=-(m-4)\end{array}}\\
(1,1), {\begin{array}{l}x_1 = n(m-2)\\y_1=m\end{array}}
\end{array}
\right.
\end{equation}

We now proceed to estimate bounds on the cardinality of $f^{(m,n)}$. 

\begin{theorem}
There are only finitely many numbers $f_k^{(m,n)}$ for
$(m-2)(n-2)$ a perfect square except when $(m,n)=(3,6)$. Lower and upper bounds
for $\left| f^{(m,n)}\right|$ are given by $1\leq \left| f^{(m,n)}\right|
\leq \lfloor \frac{d(\Omega )}2\rfloor -1,$ where $d(\Omega)$ signifies 
the number of divisors of $\Omega$.
\end{theorem}

\begin{pf}
We rewrite (\ref{pell}) into $x^2-g^2y^2=\Omega$,
where $D=(m-2)(n-2)=g^2$ and $g\in \mathbb Z$ with the requirements set forth in (\ref{var-representation}):
\begin{equation}
\label{revise}
x^2-\gamma ^2=\Omega
\end{equation}
where $\gamma =gy=\pm \sqrt{x^2-\Omega }$. Eq.~(\ref{revise}) can 
also be rewritten as $\frac{x^2}\Omega -\frac{\gamma ^2}\Omega =1$, 
the equation of a hyperbola with asymptotes
$$
\gamma =\pm \frac{\sqrt{\Omega }}{\sqrt{\Omega}}x=\pm x 
$$
and vertices
$$
(\pm \sqrt{\Omega },0). 
$$

The geometric language for the above is justified in Fig.~\ref{asymtote}. It shows that
all the solutions are symmetric over the real axis. This permits us to be
concerned only with positive $x$ and $\gamma$ in the first quadrant.

\begin{figure}
\centering\includegraphics[width=0.7\textwidth]{asymptot}
\caption{An Equation of Hyperbola: $x^2 - \gamma^2 = \Omega$}\label{asymtote}
\end{figure} 
We denote $d$ as the vertical distance from the asymptote 
$\gamma =x$ to the curve $\gamma =\sqrt{x^2-\Omega }$. Thus

\begin{equation}
\label{distance}d=x-\sqrt{x^2-\Omega }.
\end{equation}

The trivial solution when $x=y=0$ is eliminated. As seen from
Fig.~\ref{asymtote}, $\sqrt{\Omega }$ cannot be an integer otherwise
$\gamma =y=0$. Hence
$$
\max (d)=\lfloor \sqrt{\Omega }\rfloor +1-\sqrt{(\lfloor \sqrt{\Omega}\rfloor
+1)^2-\Omega }, \qquad
\min (d)=1. 
$$
where $\sqrt{\Omega }\in \mathbb R$. Therefore
\begin{equation}
\label{ineq}1\leq d\leq \lfloor \sqrt{\Omega }\rfloor +1-\sqrt{(\lfloor 
\sqrt{ \Omega}\rfloor+1)^2-\Omega }=\Phi . 
\end{equation}

From (\ref{distance}) we see that $x\in \mathbb N$ hence  
$\sqrt{x^2-\Omega }\in \mathbb N$, leading to integral 
solutions $(x,\gamma ).$ Solving for $x$ in (\ref{distance}), we get
\begin{equation}
\label{xvalue}x=\frac{\Omega +d^2}{2d}. 
\end{equation}
Similarly
$$
y=\sqrt{\frac{x^2-\Omega }{g^2}}=\frac{\Omega -d^2}{2dg}.
$$
It immediately follows from (\ref{xvalue}) that $x\in \mathbb N$,
$2d\left| \Omega +d^2,\right. $ and $\Omega \equiv -d^2$ (mod $2d$), hence $
d\left| \Omega .\right.$ On the other hand, it is apparent that $\Omega
=(m-2)^2(n-4)^2-(m-4)^2(m-2)(n-2)$ is an even number, therefore 
(\ref{xvalue}) implies that $d$ is an even number as well. Hence, 
the cardinality of $d$ becomes 
\begin{equation}\label{ineq2}
1\leq \left| d\right| \leq \sum_{d\left| \Omega \right. , 2\leq d\leq \Phi}1. 
\end{equation}
Since $(x,y)=(\frac{\Omega +d^2}{2d},\frac{\Omega -d^2}{2dg})$ for each $d$
satisfying (\ref{ineq2}),
$$
1\leq \left| (x,y)\right| \leq \sum_{d\left| \Omega \right. , 2\leq d\leq \Phi}1,
$$
which implies
\begin{equation}\label{number}
1\leq \left| f^{(m,n)}\right| \leq \sum_{d\left| \Omega \right. ,
2\leq d\leq \Phi}1. 
\end{equation}
To get sharper bounds, we need two lemmas --- each of whose proofs is
self-evident.

\begin{lemma}\label{lemma1}
$\lim \limits_{\Omega \rightarrow \infty }\Phi =\sqrt{\Omega }.$
\end{lemma}

\begin{lemma}\label{lemma2}
There are exactly $\lfloor \frac{d(\Omega )}2\rfloor -1$
$d$'s such that $2\leq d\leq \sqrt{\Omega }$ with $d\left| \Omega \right. .$
\end{lemma}

By both Lemmas~\ref{lemma1} and \ref{lemma2}, it is apparent that
$$
\sum_{d\left| \Omega \right.,  2\leq d\leq \Phi}1=\lfloor \frac{d(\Omega )}2\rfloor -1. 
$$
Therefore an analogy to (\ref{number}) is
\begin{equation}
\label{final-bound}
1\leq \left| f^{(m,n)}\right| \leq \lfloor \frac{d(\Omega )}2\rfloor -1. 
\end{equation}
We thereby complete our proof.
\end{pf}

\begin{example} 
In the case of $f^{(3,11)}$, $\Omega =40$ and 
$1\leq \left| f^{(3,11)}\right| \leq 3.$
\end{example}

\begin{example}
In the case of $f^{(27,102)}$, $\Omega =4680000$ and 
$1\leq \left| f^{(27,102)}\right| \leq 209.$
\end{example}

\end{section}


\begin{section}{Preliminaries - Diophantine Equations of the Second Degree}

We define a common language used in describing the properties of the equation (\ref{pell}) expressed in the quadratic field 
$\mathbb Q$($\sqrt{D }).$ The following definitions are well-known and have appeared in various literature \cite{chu, chu1, dickson, nagell}. Both Definitions~\ref{definitionb} and \ref{definitionc} can be proven by finite induction.

\begin{definition}\label{definitiona}
Let $D $ and $\Omega$ be two integers. If 
$x=u$ and $y=v$ are integers which satisfy (\ref{pell}), we
say, for simplicity, that the ordered pair
$$
(u,v)=u+v\sqrt{D } 
$$
is a solution to (\ref{pell}). In general, we consider all of the
solutions $(x,y)$ of
\begin{equation}
\label{aaaaa}x^2-Dy^2=1,\qquad \Omega=1 
\end{equation}
with $x,y>0$. Among these there is a least integer ordered pair $(x^{\prime },y^{\prime
})$ , such that $x^{\prime }$ and $y^{\prime }$ have their least positive
values. The ordered pair $(x^{\prime },y^{\prime }),$ or $x^{\prime }+y^{\prime } 
\sqrt{D },$ is called the\ fundamental solution of (\ref{aaaaa}). 
\end{definition}

\begin{definition}\label{definitionb} 
If $(x^{\prime },y^{\prime })$ is the fundamental
solution of (\ref{aaaaa}), then we may obtain all of the solutions, $(x^{*},y^{*})$,
of (\ref{aaaaa}) through

$$
(x^{*},y^{*})=(x^{\prime },y^{\prime })^n, 
$$
where $n=1,2,3,\ldots, etc.$ 
\end{definition}

\begin{ex-def} 
The fundamental solution of $x^2-5y^2=1$ is $(9,4),$ so all of the
solutions of this equation are given by $(9,4)^n$, where $n = 1,2,3,\ldots, etc.$
\end{ex-def}

\begin{definition}\label{definitionc}
There can be multiple classes of solutions to (\ref{pell}). If $(u_1,v_1)$ is the fundamental solution that
occurs in the class $K$ of (\ref{pell}),
then we may obtain all of the solutions 
$(u^{\prime},v^{\prime})$ belonging to the class $K$ through
$$
(u^{\prime },v^{\prime })=(u_1,v_1)(x^{*},y^{*}) = (u_1,v_1)(x^{\prime },y^{\prime })^n, 
$$
where $(x^{*},y^{*})$ and $(x^{\prime },y^{\prime })^n$ are as defined in Definition~\ref{definitionb}.
\end{definition}

\begin{ex-def}
There are only two classes of solutions to the equation 
$u^2-5v^2=4$. $(3,\pm 1)$ are the least integer ordered pairs satisfying the equation. Therefore each of $(3,\pm 1)$ is the fundamental
solution of the said equation in its own respective class. If we take $(3,1)$, and the fundamental solution
(9,4) of $x^2-5y^2=1$, then all of the solutions belonging to that class of (\ref{pell}) are given by
(3,1)(9,4)$^n$, where $n=1,2,3, \ldots, etc,$ whereas all of the solutions belonging to the other class of (\ref{pell}) are given by (3,-1)(9,4)$^n$, where $n=1,2,3, \ldots, etc.$
\end{ex-def}

\begin{definition}\label{definitiond}
$K^{\prime}$=$(u,v)(x,y)^n$ and $\overline{K}^{\prime \prime }$=$(u,-v)(x,y)^n$ are the solutions
of (\ref{pell}) in two distinct classes, $K$ and $\overline{K},$ respectively, where $n=1,2,3, \ldots, etc,$ and $(x,y)$ is the fundamental solution of (\ref{aaaaa}) and $%
(u,v)$ of (\ref{pell}). In general, if the solutions $K^{\prime }$ and $\overline{K}
^{\prime \prime }$ coincide with each other, or $K^{\prime }$ = $\overline{K}^{\prime \prime }$ for $n=1,2,3, \ldots, etc,$ we call either $K$ or $\overline{K}$ an ambiguous class.
In the case when either $u$ or $v=0$, the class that contains this $(u,v)$
is an ambiguous class.
\end{definition}

Next we need to introduce an important lemma, which is the generalization
of the bounds presented in Nagell's book \cite{nagell}.

\begin{lemma}\label{lemmae}
The fundamental solutions, $(u,v)$, of all of the
classes of (\ref{pell}) satisfy the bounds
$$
\begin{array}{c}
0\leq v\leq y^{\prime} 
\sqrt{\frac \Omega{2(x^{\prime }+1)}}, \\ \sqrt{\Omega}\leq \left| u\right| \leq \sqrt{
\frac{(x^{\prime }+1)\Omega}2} 
\end{array}
$$
where $(x^{\prime },y^{\prime })$ is the fundamental solution of (\ref{aaaaa}) and $u = x$ and $v = y$ are integers which satisfy (\ref{pell}).
\end{lemma}

\begin{pf}
The lower bound on $u,$ given as $0$ by Nagell, 
can be improved to $\sqrt{\Omega}$ since $v\geq 0$.
\end{pf}

\end{section}


\begin{section}{Class Number Arguments}
We begin this section by introducing the idea of mapping and defining the $proper$ solutions that satisfy a set of rules involving the number of the classes of solutions to the general Pell equation, (\ref{pell}).

\begin{definition}
Let $A$ be a set of the integral solutions $(u,v)$ of $u^2-Dv^2=\Omega$ and 
$B$ be a set of the integer solutions $(r,s)$, where $r, s \in \mathbb N$, such that we can map $A$ into $B$. In other words, we denote $\theta $ as which assigns to each $(u,v)$ of $A$ 
an $(r,s)$ of $B$, i.e., $\theta :A\rightarrow B.$
\end{definition}

\noindent Note that both $r$ and $s$ are as defined in the aforesaid relationship, $i.e$,  {\bf $f^{(m,n)}_k=f_r^m\cap f_s^n$}. 

\begin{definition}\label{definitiong}
$(u,v)$ of (\ref{pell}) is a {\it proper solution} if: 

\begin{description}
\item[i.] $(u,v)$ satisfies the bounds in Lemma~\ref{lemmae} or, in other 
words, $(u,v)$ is a fundamental solution pair of a solution class of (\ref{pell}), and
\item[ii.] $(u,v)$ produces a valid mapping, i.e., $\theta :A\rightarrow B.$
\end{description}
\end{definition}

\noindent For example, we know from Definition~\ref{definitionc},
$(3,1)$ is a fundamental solution which constitutes one class of
solutions to the equation $x^2-5y^2=4,$ hence satisfying the bounds in
Lemma~\ref{lemmae}. We term $(3,1)$ a {\it proper solution} because
$(3,1)(9,4)^n$ also produces a valid mapping $\theta :A\rightarrow B$
for some $n\in \mathbb N$ and $(r, s)$ of $B$.

\begin{theorem}\label{thm2}
In most cases, there are 4, and perhaps more $proper$ solutions associated with $f^{(m,n)},$ a set of numbers that are simultaneously representable as both $m$-gonal and $n$-gonal numbers, for $m,n\in 
\mathbb N.$
\end{theorem}

\begin{pf} 
From (\ref{r-s-equation}) we know that $(x_o,\pm y_o)=[(n-4)(m-2),$ $%
\pm (m-4)]$ and $(x_1,\pm y_1)=$ $[n(m-2),$ $\pm m]$ are the solutions
to (\ref{pell}). In general, if $(a,b)$ and $(a\prime ,b\prime )$ belong to
the same class, then it is easy to check that $\Omega \left| a^{\prime
\prime },b^{\prime \prime },\right. $ where $(a^{\prime \prime },b^{\prime
\prime })=(aa^{\prime }\pm bb^{\prime }D,ab^{\prime }\pm ba^{\prime }).$ It
is evident that if $K$ is the class consisting of the solutions $%
(x_i,y_i),i=1,2,3,\ldots,$ and $\overline{K},$ or the conjugate of $%
K,(x_i,-y_i),$ $i=1,2,3,\ldots,$ will constitute another class. Since the case $%
(-x,-y)$ collapses onto class $K$, the same for the case $(-x,y)$, which
collapses onto $\overline{K}.$ Therefore under necessary and
sufficient conditions, $[(n-4)(m-2),$ $\pm (m-4)]$ and $[n(m-2),$ $\pm m]$
represent four different classes of solutions, though they are not necessarily
{\it fundamental}. We can thus have at least 4 $proper$
solutions, i.e., $[(n-4)(m-2),$ $\pm (m-4)]$
or $[n(m-2),$ $\pm m].$
\end{pf}

Next, we speak of an ambiguous class. We check certain conditions that
will put both of the aforesaid $(x_o,y_o)$ and $(x_1,y_1)$ in the same
solution class. As $\Omega$ in Lemma~\ref{lemmae} becomes large, we can
have a considerable but finite number of fundamental solutions
belonging to different classes that satisfy the bounds.  We will see
that the number of $proper$ solutions limits to, in some cases, no more
than four.

\begin{theorem}\label{thm3}
There are at least two $proper$ solutions when

\begin{description}
\item[i.] $n=m+1$ and $n=m+2$ for $m\geq 5;$
\item[ii.] when $n-m>2,$ $(3,7),(3,8)$\ and $(3,10)$\ are the only
cases.
\end{description}

\noindent Each of {\em i} and {\em ii} represents the necessary and sufficient 
conditions such that $(x_o,y_o)$ and $(x_1,y_1)$ both belong to the same solutions class, i.e., 
both are ambiguous.
\end{theorem}

\begin{pf} 
From Theorem~\ref{thm2}, $(x_o,\pm y_o)=$ $[(m-2)(n-4),$ $\pm
(m-4)]$ and $(x_1,\pm y_1)=$ $[n(m-2),$ $\pm m]$ can represent at most 4
classes of solutions. We can write $(x_o,\pm y_o)(x^{\prime },y^{\prime
})=(x_1,\pm y_1)$ as

$$
\left\{ 
\begin{array}{ll}
x_1 & =(m-2)(n-4)x^{\prime }\pm (m-4)(m-2)(n-2)y^{\prime }=n(m-2) \\  
y_1 & =(m-2)(n-4)y^{\prime }\pm (m-4)x^{\prime }=\pm m 
\end{array}
\right. 
$$
Multiplying $x_1$ by $\frac{(m-4)}{(m-2)}$ and $y_1$ by $(n-4)$ we get
$$
\left\{ 
\begin{array}{ll}
\frac{(m-4)}{(m-2)}x_1= & (m-4)(n-4)x^{\prime }\pm (m-4)^2(n-2)y^{\prime }=n(m-4) \\ 
(n-4)y_1= & (m-2)(n-4)^2y^{\prime }\pm (m-4)(n-4)x^{\prime }=\pm m(n-4) 
\end{array}
\right. 
$$
Note that the signs above are member-wise linked with each other, so by
subtracting $\frac{(m-4)}{(m-2)}x_1$ from $(n-4)y_1,$ we can only have
$$
y^{\prime }[(m-2)(n-4)^2-(m-4)^2(n-2)]=\left\{ 
\begin{array}{l}
4(n-m) \\ 
-2(mn-2m-2n) 
\end{array}
,\right. 
$$
whereas
$$
y^{\prime }[(m-2)(n-4)^2+(m-4)^2(n-2)]=\left\{ 
\begin{array}{l}
4(n-m) \\ 
-2(mn-2m-2n) 
\end{array}
\right. 
$$
is impossible. Further simplified,
$$
y^{\prime }(n-m)(mn-2m-2n)=\left\{ 
\begin{array}{l}
4(n-m) \\ 
-2(mn-2m-2n) 
\end{array}
\right. 
$$
and
$$
y^{\prime }=\left\{ 
\begin{array}{l}
\frac 4{mn-2m-2n}\\
\frac {-2}{n-m}
\end{array}
\right. .
$$
Knowing $n>m$ and $y^{\prime }\in \mathbb Z,$ we easily deduce that when $%
y^{\prime }=\frac {-2}{n-m},$ $n=m+1$ and $n=m+2$ are the two satisfying cases.
In the case when $y^{\prime }=\frac 4{mn-2m-2n},$
$$
mn-2m-2n=\left\{ 
\begin{array}{l}
\pm 1 \\ 
\pm 2 \\ 
\pm 4 
\end{array}
\right. 
$$
giving us
$$
n=\left\{ 
\begin{array}{l}
\frac{2m\pm 1}{m-2} \\ \frac{2m\pm 2}{m-2} \\ \frac{2m\pm 4}{m-2} 
\end{array}
\right. . 
$$
A simple calculation yields the only 3 satisfying cases when $n-m > 2$: $%
(m,n)=(3,7),$ $(3,8),$ and $(3,10).$

We prove and therefore single out the cases when $(x_o,\pm y_o)$
and $(x_1,\pm y_1)$ belong to the same class, or when $(x_1,\pm y_1)$ is generated from $(x_o,\pm y_o).$ We need to ascertain whether  $(x_o,\pm y_o)$ satisfies the bounds in Lemma~\ref{lemmae}. If they do then $(x_o,\pm y_o)$
are the two $proper$ solutions, otherwise we must assume there exists at least
two other $proper$ solutions that will each generate $(x_o,\pm y_o).$
However, we must note that $x_o,y_o\neq 0,$ i.e., $[(m-2)(n-4),$ $\pm (m-4)]%
\not =(0,0),$ otherwise according to Definition~\ref{definitiond}, we will have one less
class and the remaining one is ambiguous. The case when this does not occur
is $m\geq 5.$

\end{pf}

We restrict our attention to the two aforesaid special cases, focusing
our interest on $m\geq 5$: (a) $f^{(m,m+2)}$ and (b) $f^{(m,m+1)}.$ We
prove that $(x_o,\pm y_o)$ indeed satisfy the bounds and therefore are
the $proper$ solutions. The following lemma is useful and readily
obtained:

\begin{lemma}\label{specialcase}
We designate $(x^{\prime },y^{\prime })$ as
the fundamental solution of $x^2-Dy^2=1.$ Therefore, when $n=m+2,$ $%
(x^{\prime },y^{\prime })=(m-1,1),$ whereas $n=m+1,$ $(x^{\prime },y^{\prime
})=(2m-3,2).$
\end{lemma}

\begin{theorem}\label{thm4}
In the case of $f^{(m,m+2)},$ when $m\geq
4,$ two proper solutions of (\ref{pell}) are 
$$
[(\lfloor \sqrt{\frac \Omega {2m}}\rfloor +1)^2,\pm (\lfloor \sqrt{\frac
\Omega {2m}}\rfloor -1)] 
$$
\end{theorem}

\begin{pf}
From Theorem~\ref{thm2}, $(x_o,\pm y_o)=[(m-2)^2,\pm
(m-4)] $ by substitution. We also have

\begin{equation}
\label{JoeSu}\left\{ 
\begin{array}{l}
D=m(m-2) \\ 
\Omega =(m-2)^4-m(m-2)(m-4)^2=2m^3-8m^2+16 
\end{array}
\right. 
\end{equation}
Applying Lemma~\ref{lemmae}, we get

\begin{equation}
\label{JoeSu0} 
\begin{array}{c}
0\leq v\leq 
\sqrt{\frac \Omega {2m}} \\ \sqrt{\Omega }\leq \left| u\right| \leq \sqrt{
\frac{m\Omega }2} 
\end{array}
\end{equation}

Considering the upper bound for $v$, we yield $\sqrt{(m-3)^2}<\sqrt{\frac
\Omega {2m}}=\sqrt{m^2-4m+\frac 8m}<\sqrt{(m-2)^2},$ which means $\lfloor 
\sqrt{\frac \Omega {2m}}\rfloor =m-3.$ 
It is inferred from (\ref{JoeSu0})
that
$$
0\leq \lfloor\sqrt{\frac \Omega {2m}}\rfloor -1=m-4<\sqrt{\frac \Omega {2m}}%
,\qquad m\geq 4. 
$$
Because $\lfloor \sqrt{\frac \Omega {2m}}\rfloor -1=m-4$ satisfies
the bounds, we know that it is a fundamental solution of a particular class.
Since the mapping $\theta :(x_o,y_o)\rightarrow (r_o,s_o)$ is
valid, we know that $(x_o,y_o)$ and its conjugate, $(x_o,-y_o),$ are the
2 proper solutions. In other words, $y_o=\lfloor\sqrt{\frac \Omega {2m}}%
\rfloor -1.$ By substitution we get $(x_o,\pm y_o)=[(m-2)^2,\pm
(m-4)]=[(\lfloor\sqrt{\frac \Omega {2m}}\rfloor +1)^2,\pm (\lfloor\sqrt{%
\frac \Omega {2m}}\rfloor -1)].$

\end{pf}

In a similar fashion, we also get two $proper$ solutions in the case of
$f^{(m,m+1)}$. For brevity we omit the proof herein:

\begin{theorem}\label{thm5}
In the case of $f^{(m,m+1)}$, when m$\geq $4, two proper
solutions of (\ref{pell}) are 
$$
[(\lfloor \sqrt{\frac \Omega {m-1}}\rfloor \lfloor \sqrt{\frac \Omega {m-1}}%
\rfloor +\lfloor\sqrt{\frac \Omega {m-1}}\rfloor ),\pm (\lfloor\sqrt{\frac
\Omega {m-1}}\rfloor -1)] 
$$
\end{theorem}

We will go on to prove that\ $(x_o,\pm y_o)$ from Theorem~\ref{thm5} 
are indeed the {\it only} two proper solutions:

\begin{theorem}\label{thm6}
There are only two proper solutions, i.e., 
$(x_o,\pm y_o),$ in the case $n=m+1,$ as long as $m\geq 5$.
\end{theorem}

\begin{pf} 
By Lemma~\ref{specialcase}, we take $(x^{\prime },y^{\prime
})=(2m-3,2) $ as the fundamental solution of $x^2-Dy^2=1.$ From Theorem~\ref{thm3}, we know that for $n=m+1,$

$$
(x_o,y_o)(x^{\prime },y^{\prime })=(x_1,y_1) 
$$
or
$$
[\underbrace{(m-2)(m-3)}_{x_o},\underbrace{(m-4)
}_{y_o}](\underbrace{2m-3}_{x^{\prime }},
\underbrace{2}_{y^{\prime }})=[\underbrace{(m+1)(m-2)}_{x_1},
\underbrace{m}_{y_1}]
$$
For brevity, we say in $\mathbb Q[\sqrt{D}],$

\begin{equation}
\label{super}(x_1,y_1)\equiv (x_ox^{\prime }+y_oy^{\prime }D,x^{\prime
}y_o+x_oy^{\prime })\bmod \left\{ 
\begin{array}{l}
2(n-2) \\ 
2(m-2) 
\end{array}
.\right. 
\end{equation}
hence by way of both (\ref{x-equation}) and (\ref{y-equation})

$$
(x_1,y_1)\equiv [-(m-2)(n-4),-(m-4)]\bmod \left\{ 
\begin{array}{l}
2(n-2) \\ 
2(m-2) 
\end{array}
.\right. 
$$
Since $y^{\prime }=2$ and $D=(m-2)(n-2),$ we deduce (\ref{super}) to

\begin{equation}
\label{k}(x_1,y_1)\equiv (x_ox^{\prime },x^{\prime }y_o+x_oy^{\prime })\bmod \left\{ 
\begin{array}{l}
2(n-2) \\ 
2(m-2) 
\end{array}
.\right. 
\end{equation}
We have to prove the non-existence of another proper solution, besides
the two from Theorem~\ref{thm5}, i.e.,
$$
(x_o,\pm y_o)=[(\lfloor \sqrt{\frac \Omega {m-1}}\rfloor \lfloor \sqrt{\frac
\Omega {m-1}}\rfloor +\lfloor \sqrt{\frac \Omega {m-1}}\rfloor ),\pm (\lfloor 
\sqrt{\frac \Omega {m-1}}\rfloor -1)]. 
$$
We will proceed with this by assuming that there exists a proper solution $%
(a,b)$, such that
$$
\theta :(a,b)\rightarrow (r,s) 
$$
is valid, where $0<a<x_o,$ $0<b<y_o.$ We shall also see that

\begin{equation}
\label{incong}\left\{ 
\begin{array}{l}
a 
\not\equiv \pm (m-2)(n-4)\bmod 2(n-2) \\ b\not\equiv -(m-4)\bmod 2(m-2) 
\end{array}
\right. , 
\end{equation}
otherwise $(a,b)$ will be equal to some $(x,y)\in \mathbb N$ by the fact that the
map $(x,y)\stackrel{\theta }{\rightarrow }(r,s)$ is injective. So, if $%
(a_k,b_k)\stackrel{\theta }{\rightarrow }(r,s)$ is valid, $(r,s)$ must be
generated by
\begin{equation}
\label{nice}(a_k,b_k)=(a,b)(x^{\prime },y^{\prime })^k,\qquad k=1,3,5,\ldots 
\end{equation}
It is clear that $k$ cannot be even, else by putting $k=2j,$

\begin{equation}
\label{common}(x^{\prime },y^{\prime })^{2j}\equiv (1,2jx^{\prime }y^{\prime
})\bmod \left\{ 
\begin{array}{c}
2(n-2) \\ 
2(m-2) 
\end{array}
\right. 
\end{equation}
and the result of $(a,b)(x^{\prime },y^{\prime })^{2j}$ will not satisfy the condition in (\ref{incong}). Putting $k=1,$ we have
$$
(a,b)(x^{\prime },y^{\prime })=(ax^{\prime }+by^{\prime }D,bx^{\prime
}+ay^{\prime }) 
$$
and since $y^{\prime }=2$ and $D=(m-2)(n-2),$
$$
(a,b)(x^{\prime },y^{\prime })=(ax^{\prime },bx^{\prime }+ay^{\prime })\bmod \left\{ 
\begin{array}{c}
2(n-2) \\ 
2(m-2) 
\end{array}
\right. . 
$$
For $k=1,3,5,\ldots,$ we have by way of (\ref{common}),
$$
\begin{array}{ll}
(a_k,b_k)=(a,b)(x^{\prime },y^{\prime })(x^{\prime },y^{\prime })^{2j} & 
\equiv [ax^{\prime }+2jxy(bx^{\prime }+ay^{\prime })D,bx^{\prime
}+ay^{\prime }+2ajx^{\prime 2}y^{\prime }] 
\text{ } \\  & \equiv [ax^{\prime },bx^{\prime }+ay^{\prime }+2ajx^{\prime
2}y^{\prime }]\text{ } 
\end{array}
$$
$$
\qquad \qquad \qquad \qquad \quad \qquad \qquad \qquad \bmod \left\{
\begin{array}{c}
2(n-2) \\ 
2(m-2) 
\end{array}
\right..
$$

We have to also assume, for some $k,$ (\ref{nice}) will produce a valid
mapping. Thus, from (\ref{k}) we see that both
$$
\left\{ 
\begin{array}{l}
a_k\equiv ax^{\prime } \\ 
x_1\equiv x_ox^{\prime } 
\end{array}
\right. \bmod 2(n-2). 
$$
Because $a_k$ is a solution, so both
$$
\left\{ 
\begin{array}{l}
a_k \\ 
x_1 
\end{array}
\right. \equiv -(m-2)(n-4)\bmod 2(n-2). 
$$
This implies that $a$ and $x_o$ must satisfy the same congruence, but this
is in contradiction to what we have assumed, (\ref{incong}). Therefore $%
(a,b) $ cannot exist, leaving us with the only two $proper$ solutions 
aforementioned, i.e., $(x_o,\pm y_o).$ The same argument, i.e., $m\geq 5$, from
Theorem~\ref{thm3} applies.

\end{pf}

\begin{theorem}\label{thm7}
There are only two proper solutions, i.e., $%
(x_o,\pm y_o),$ in the case $n=m+2$ for $m$ even and $\geq 6$.
\end{theorem}

\begin{pf}
Using the proof method of the last theorem in the case $n=m+2,$ we have
$$
[\underbrace{(m-2)^2}_{x_o},\underbrace{(m-4)}_{y_o}](\underbrace{m-1}_{x^{\prime }},
\underbrace{1}_{y^{\prime }})=[\underbrace{(m+2)(m-2)}_{x_1},
\underbrace{m}_{y_1}]. 
$$
Working in $\mathbb Q[\sqrt{D}]$ yields
\begin{equation}
\label{super1}(x_1,y_1)\equiv (x_ox^{\prime }+y_oy^{\prime }D,x^{\prime
}y_o+x_oy^{\prime })\bmod \left\{ 
\begin{array}{l}
2(n-2) \\ 
2(m-2) 
\end{array}
.\right. 
\end{equation}
Therefore if $m$ is an even number, $y_o$ is also even. Providing $y^{\prime
}=1$ and $D=(m-2)(n-2),$ we can deduce (\ref{super1}) down to
$$
(x_1,y_1)\equiv (x_ox^{\prime },x^{\prime }y_o+x_oy^{\prime })\bmod
\left\{ 
\begin{array}{l}
2(n-2) \\ 
2(m-2) 
\end{array}
.\right. 
$$
Thus, we can assume the existence of $(a,b)$ and arrive at a contradiction.
Finally, the proof follows just as illustrated above.

\end{pf}

The following corollaries illustrate the application of the general algorithm provided above.

\begin{corollary}\label{corollary1}
$\left| f^{(3,5)} \right| = \infty$ and
$$
f_k^{(3,5)}=\frac{2w+\sqrt{3w^2+12w}}{48}, 
$$
where $w=(2+\sqrt{3})^{2k-1}-(2-\sqrt{3})^{2k-1}.$
\end{corollary}

\begin{ex}
$f_1^{(3,5)}=1,f_2^{(3,5)}=210,$ $f_3^{(3,5)}=$ $40755,\ldots$, \seqnum{A014979}.
\end{ex}

\begin{corollary}\label{corollary2}
$\left| f^{(3,7)} \right| = \infty$ and 
$$
f^{(3,7)}=\frac{S^2-9}{40}, 
$$
where $S=3\sqrt{5}(w+\overline{w})\pm 5(w-\overline{w})$ and $\left\{ 
\begin{array}{c}
w=(9+4 
\sqrt{5})^{2\lfloor \frac{k+1}2\rfloor -1} \\ \overline{w}=(9-4\sqrt{5}%
)^{2\lfloor \frac{k+1}2\rfloor -1} 
\end{array}
\right. ,\quad k=1,2,3,\ldots$, 
yielding certain values of $f^{(3,7)}$.
\end{corollary}

\begin{ex}
$f^{(3,7)}=1,$ $f^{(3,7)}=55,$ $f^{(3,7)}=121771,\ldots$, \seqnum{A046194}.
\end{ex}

\begin{corollary}\label{corollary3}
$\left| f^{(3,6)} \right| = \infty$ and $f_k^{(3,6)}=(2k-1)k. $
\end{corollary}

\begin{ex}
$f^{(3,6)}=1, f^{(3,6)}=6, f^{(3,6)}=15, \ldots$, \seqnum{A000384}.
\end{ex}

By Theorems~\ref{thm6} and \ref{thm7} we readily have, without excessive
calculations,

\begin{corollary}
$\left| f^{(1993,1994)} \right| = \infty$, where $f_1^{(1993,1994)}=1,$ $f_2^{(1993,1994)}=1004438512832684175\rightarrow \left\{ \begin{array}{l}r=31764429 \\ s=31756455 \end{array}
\right. ,\ldots$
\end{corollary}

\begin{corollary}
$\left| f^{(1994,1996)} \right| = \infty$, where $f_1^{(1994,1996)}=1,$ $f_2^{(1994,1996)}=63014073509833425 \rightarrow\left\{ 
\begin{array}{l}
r=7954065 \\ 
s=7950075 \end{array}\right. ,\ldots$
\end{corollary}

\end{section}


\begin{section}{Conclusion}
In this paper we considered the set of integers, $f^{(m,n)},$ that are simultaneously
representable as $m$- and $n$-gonal numbers, deriving some of the interesting
properties about them.

First, we derived bounds on the cardinality of $f^{(m,n)}$ when $(m-2)(n-2)$ is a perfect square except when $(m,n)=(3,6).$ We employed techniques from hyperbolic geometry to bound the
number of solutions to (\ref{pell}). It is obvious that in this case we would have
no more than $d(\Omega )$ solutions since $x^2-Dy^2=(x+D^{\prime
}y)(x-D^{\prime }y),$ where $D^{\prime }D^{\prime }=D.$ A sharp
upper bound is also obtained: $\lfloor \frac{d(\Omega )}2\rfloor -1.$ We may point out that in the case when $\left|
f^{(m,n)}\right| =\infty ,$ or $(m-2)(n-2)$ is not a perfect square except when $(m,n)=(3,6),$ (\ref{pell}) always has infinitely many solutions with $\Omega >2\sqrt{D}+1,$ and therefore $D$ is a quadratic residue of $\Omega $ and hence of its divisors. 

Second, we examined and singled out the solution classes, or proper solutions, that can be used to generate $f^{(m,n)}$, using the theory of Pell diophantine equations
and the improved bounds of \cite{nagell}. In the cases $n=m+1$ and $n=m+2$, there are
only two proper solutions. This fact enabled us to quickly generate $f^{(m,m+1)}_k$ and $f^{(m,m+2)}_k$ where $k = 1, 2, 3, . . .$. The approach used in arriving at the two special cases can be readily extended to algebraic cases involving other $m$ and $n$ as well. 

Pell-Diophantine equations play an important role in this
paper, as well in the field of binary quadratic forms \cite{gauss}. For example, in the case when we put $(m,n)=(3,7),$ or $\Omega =4,$ (\ref{pell}) of this kind is heavily used in the theory of biquadratic forms \cite{flath} and the Lucas test for Mersenne primes \cite{shank}. The Pell equation encountered in this paper
may have some applications to these fields.
\end{section}

\begin{thebibliography}{99}

\bibitem{ando}
S. Ando,
On a system of Diophantine equations concerning the polygonal numbers,
\emph{Fibonacci Quart.}
\textbf{20} (1982), 349--353.

\bibitem{chu}
W. Chu, 
Regular polygonal numbers and generalized Pell equations, 
\emph{Int. Math. Forum.}
\textbf{2} (2007), 781--802.

\bibitem{chu1}
W. Chu and P. Magli, 
Polygonal numbers and Diophantine equations,
\emph{Rend. Accad. Naz. Sci. XL Mem. Mat. Appl.}
\textbf{5} (2003), 1-34.

\bibitem{dickson}
L. E. Dickson,
\emph{History of the Theory of Numbers: Volume II},
G.E. Stechert \& Co., 1934.

\bibitem{eggan} 
L. C. Eggan, P. C. Eggan, J. L. Selfridge,
Polygonal products of polygonal numbers and the Pell equation,
\emph{Fibonacci Quart.}
\textbf{20} (1982), 24--28.

\bibitem{flath}  
D. E. Flath,
\emph{Introduction to Number Theory}, 
John Wesley \& Sons, 1989.

\bibitem{gauss}
C. F. Gauss,
\emph{Disquisitiones Arithmeticae}, 
Yale University, 1966.

\bibitem{gelfond}  
A. O. Gelfond,
\emph{The Solution of Equations in Integers},
P.Noordhoff. LTD-Groningen, 1960.

\bibitem{krausz} 
T. Krausz,
A note on equal values of polygonal numbers,
\emph{Publ. Math. Debrecen.}
\textbf{54} (1999), 321--325.

\bibitem{lucas} 
D. S. Lucas,
Numbers common to two polygonal sequences,
\emph{Fibonacci Quart.}
\textbf{11} (1973), 78--84.

\bibitem{nagell}  
T. Nagell,
\emph{Introduction to Number Theory: 2nd Edition},
Chelsea, 1981.

\bibitem{shank}
D. Shank,
\emph{Solved and Unsolved Problems in Number Theory: 3rd Edition}, 
Chelsea, 1985.

\bibitem{Sloane} N. J. A. Sloane,
The On-Line Encyclopedia of Integer Sequences.
Published electronically at \htmladdnormallink{http://www.research.att.com/$\sim
$njas/sequences/}{http://www.research.att.com/~njas/sequences/}.

\end{thebibliography} 

\bigskip
\hrule
\bigskip

\noindent 2000 {\it Mathematics Subject Classification}: \ \ Primary 11D09.


\noindent \emph{Keywords:} polygonal number, Pell Diophantine equation, quadratic equation, fundamental class, generating function. 

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences 
\seqnum{A000217},
\seqnum{A000290},
\seqnum{A000326},
\seqnum{A000384},
\seqnum{A014979},
\seqnum{A046194}, and
\seqnum{A129654}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 25 2007;
revised version received December 30 2007. 
Published in {\it Journal of Integer Sequences}, December 30 2007.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                




