\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}

\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}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

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

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}

\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 
A Closed Form for Representing Integers as \\
\vskip .1in
Sums and Differences of Cubes
}
\vskip 1cm
\large
Michael Nyblom \\
School of Science \\
RMIT University\\
Melbourne, Victoria 3001\\
Australia \\
\href{mailto:michael.nyblom@rmit.edu.au}{\tt michael.nyblom@rmit.edu.au} \\
\end{center}

\vskip .2 in

\begin{abstract}
By applying an existing characterization for a positive integer to be
represented  as a sum of two cubes of positive integers, we construct an
elementary proof of Ramanujan's famous result---namely, that the number $1729$
is the smallest positive integer represented as a sum of two cubes in
two different ways. Similarly, by applying an existing characterization
for a positive integer to be
represented as a difference of cubes of two positive integers, we also
apply this characterization to construct the generating function for a
sequence of integer ordered pairs $(a_{n},b_{n})\not= (a'_{n},b'_{n})$
satisfying $a_{n}^{3}+b_{n}^{3}= a'^{\,3}_n + b'^{\,3}_n $, which are
distinct from Ramanujan's ``near integer'' solutions to Fermat's 
equation---namely, those satisfying $a_{n}^{3}+b_{n}^{3}=c_{n}^{3}+(-1)^{n}$.
\end{abstract}



\section{Introduction}

Anyone familiar with the mathematical collaboration between Hardy and Ramanujan, is
probably aware of the so-called Hardy-Ramanujan number 1729. As legend would have it,
while visiting Ramanujan in hospital, Hardy remembered that he had ridden in a taxi cab numbered 1729
and remarked that the number seemed a rather dull one.
 ``No,'' Ramanujan replied, ``it is a very interesting
number, it is the smallest number expressible as the sum of two cubes in two different ways.'' In particular,
Ramanujan was stating the fact that $1729=10^{3} +9^{3}=12^{3} +1^{3}$.

Given Ramanujan's prodigious calculating ability, one may wonder whether he deduced this arithmetic property of the number 1729
after a short reflection, or knew of the result from his earlier research work. It would seem that the later is most likely the case.
The mathematician Ken Ono and his graduate student Sarah Trebal-Leder
discovered within one of Ramanujan's notebooks his
work on ``near integer'' solutions to the Diophantine equation $a^{3}+b^{3}=c^{3}$ \cite{jorgen}. These are defined as the integer triples
$(a_{n},b_{n},c_{n})$, that satisfy the equation $a_{n}^{3}+b_{n}^{3}=c_{n}^{3}+(-1)^{n}$. Indeed, Ramanujan showed that infinitely many
such triples $(a_{n},b_{n},c_{n})$ exist, and encapsulated this result by producing the generating functions for the sequences $a_{n}$, $b_{n}$ and $c_{n}$ as follows:
\begin{align*}
\frac{x^{2}+53x+9}{x^{3}-82x^{2}-82x+1} &=  a_{0}+a_{1}x+a_{2}x^{2}+\cdots \\
\frac{2x^{2}-26x-12}{x^{3}-82x^{2}-82x+1} &=  b_{0}+b_{1}x+b_{2}x^{2}+\cdots \\
\frac{2x^{2}+8x-10}{x^{3}-82x^{2}-82x+1} &=  c_{0}+c_{1}x+c_{2}x^{2}+\cdots .
\end{align*}

Setting $x=0$ in the above generating functions produces the triple 
$$(a_{0},b_{0},c_{0})=(9,-12,-10),$$
 from which one can deduce that
$9^{3}+(-12)^{3}=(-10)^{3}+(-1)^{0}$; that is, $9^{3}+10^{3}=1^{3}+12^{3}=1729$. Thus, as all triples $(a_{i},b_{i},c_{i})$,
 for
$i=2,4,\ldots$, are such that $a_{i}>9$, $|b_{i}|>12$ and $|c_{i}|>10$,
 Ramanujan was able to uncover the now famous arithmetic property of the number 1729.

In this paper, we shall provide an alternate but elementary proof of this property of the so-called Hardy-Ramanujan number 1729.
We do this by first noting both a necessary and sufficient condition  for a positive integer to be represented as a sum of
two positive integer cubes, obtained by Broughan \cite{broughan}. Applying this characterization, one can then
determine a closed-form expression for those integers of the form $N=a^{3}+b^{3}$, for some $a,b\in\mathbb{N}$, with $a\geq b$ and having a prescribed divisor $d$. As the set of such integers, denoted $N(d)$, is finite, we can then determine the largest divisor $d$, such that the minimum element of $N(d)$ exceeds the number $1729$. Thus, by considering the pairwise intersections between these finite collection of sets having distinct sums of cubes representations, one can deduce the arithmetic property of the Hardy-Ramanujan number.

By noting an analogous characterization for a positive integer $N$ to be represented as a difference of two positive integer cubes due to Broughan \cite{broughan}, we can show that the closed-form expression for such $N$, having a prescribed odd divisor $d$, is identical to the formula given in the above case for sums of cubes. 
Equating the two closed-form expressions generating the elements in the
sets $N(1)$ and $N(7)$, which are now countably infinite, we can determine
those integers $N$ that can be represented as a difference of two
cubes in two different ways, via the solution of the Pell-like equation
$X^{2}-7Y^{2}=114$. As the solutions of such Diophantine equations can
be recursively generated, one can then easily construct the generating
functions for the sequence terms $a_{n}$, $a'_{n}$, $b_{n}$, $b'_{n}$ such
that $N=a_{n}^{3}- a'^{\,3}_n = b'^{\,3}_n  -b_{n}^{3}$.  This yields
ordered pairs of positive integers $(a_{n},b_{n})\not= (a'_{n},b'_{n})$,
satisfying $a_{n}^{3}+b_{n}^{3}= a'^{\,3}_n + b'^{\,3}_n$, which are
distinct from Ramanujan's ``near integer'' solutions to the Fermat
equation $a^{3}+b^{3}=c^{3}$.

\section{Main result}
We begin by noting two similar characterizations, one for the representation of an integer $N$ as a difference of two positive integer cubes, and the other for the representation of an integer $N$  as a sum of two positive integer cubes, by Broughan \cite{broughan}. This characterizations follows from an application of the standard algebraic identities for sums and differences of two cubes---namely, $a^{3}+b^{3}=(a+b)(a^{2}-ab+b^{2})$ and $a^{3}-b^{3}=(a-b)(a^{2}+ab+b^{2})$, where the divisor $d$ of the integer $N$ is either $d=a+b$ or $d=a-b$,
respectively.

\begin{theorem} \label{THM01}
 An integer $N > 1$ is expressible as a difference of cubes
 of two positive integers,
 that is, $N = a^{3}-b^{3}$
 for some $a,b, \in \mathbb{N}$,
 if and only if
 there exists a divisor $d$
 of $N$ with $1 \leq d \lt \sqrt[3]{N}$
 such that $\frac{N}{d}-d^{2} = 3q$,
 for some $q \in \mathbb{N}$
 and $d^{2} + 4 q$ a perfect square. 
 
 Similarly, an integer $N \gt 1$ is expressible as a sum of cubes
 of two positive integers,
 that is, $N = a^{3}+b^{3}$
 for some $a,b, \in \mathbb{N}$,
 if and only if
 there exists a divisor $d$
 of $N$ with $\sqrt[3]{N} \lt d \leq N$
 such that $d^{2} -\frac{N}{d} = 3q$,
 for some $q \in \mathbb{N}$
 and $d^{2} - 4 q$ a perfect square.
\end{theorem}

Before establishing the main result, we shall first deduce an unusual property of a particular elliptic curve as follows:
\begin{corollary}
Apart from $(0,\pm 1)$,
 the elliptic curve
\begin{equation} \label{EQU02}
 y^{2} = 36x^{3}+36x^{2}+12x+1,
\end{equation}
passes through no other lattice point of $\mathbb{Z} \times \mathbb{Z}$.
\end{corollary}
\begin{proof}
  We first note, as $36x^{2}+36x+12 \gt 0$
 for all $x$,
 that $36x^{3}+36x^{2}+12x+1 \lt 0$
 for $x \leq -1$.
Thus, if one assumes the elliptic curve in (\ref{EQU02})
 passes through another lattice point $(k,m)$ other than $(0,\pm 1)$,
 then $k$ must be an integer
 greater than or equal to one.
 Setting $d = 1$
 and $q = 9k^{3} + 9k^{2} +3k$,
 observe from our assumption and (\ref{EQU02}) that $d^{2}+4q=m^{2}$; that is,
 that $d^{2}+4q$ is a perfect square.
 Moreover, if one defines the integer $N \gt 1$ via
 the equation $\frac{N}{d}-d^{2}=3q$, then
 $N=(3k+1)^{3}$, and from Theorem \ref{THM01} $N$ can
 be represented as $N=a^{3}-b^{3}$,
 where $a,b \in \mathbb{N}$. Thus $(3k+1)^{3}+b^{3} = a^{3}$,
 a contradiction to Fermat's last theorem.
 Consequently the elliptic curve in (\ref{EQU02}) can only pass through the lattice points $(0,\pm1)$ in $\mathbb{Z} \times \mathbb{Z}$.
\end{proof}
We now establish the main result, where we give a closed-form expression for those integers $N$ that can be represented as a sum or difference of two cubes, having a prescribed divisor.
\begin{theorem} \label{THM02}
Suppose an integer $N>1$ can be represented as $N=a^{3}+b^{3}$, for some $a,b\in\mathbb{N}$, where $a\geq b$, with a prescribed divisor $d$ satisfying the criterion of Theorem \ref{THM01}. 
Then for $d$ odd we have
\begin{equation} \label{EQU04}
 N = \frac{d}{12}(9(2r+1)^{2} + 3d^{2}),
\end{equation}
with $0\leq r<\frac{d-1}{2}$, while for $d$ even we have
\begin{equation} \label{EQU05}
 N=\frac{d}{12}(9(2r)^{2}+3d^{2}),
\end{equation}
with $0\leq r<\frac{d}{2}$.

Alternatively, if an integer $N>1$ can be represented as $N=a^{3}-b^{3}$, for some $a,b\in\mathbb{N}$, where $a\gt b$ with a prescribed divisor $d$, satisfying the criterion of Theorem \ref{THM01}, then for $d$ odd, $N$ is of the form in (\ref{EQU04}) with $r>\frac{d-1}{2}$, and for $d$ even, $N$ is of the form in (\ref{EQU05}) with $r>\frac{d}{2}$.
\end{theorem}
\begin{proof}
Suppose an integer $N \gt 1$ can be represented as $N=a^{3}+b^{3}$ for some $a, b \in \mathbb{N}$, where $a\geq b$ with a prescribed divisor $d$ of $N$ satisfying the criteria of Theorem \ref{THM01}. Consider the resulting pair of simultaneous equations
\begin{align*}
  a +b &= d \\
 a^{2}-ab+b^{2} &= \frac{N}{d}.
\end{align*}
 Upon solving for $a \gt 0$, this yields
\begin{equation} \label{EQU03}
  a = \frac{3d +\sqrt{12\frac{N}{d} - 3d^{2}}}{6},
\end{equation}
 where we may choose the positive root as
 $\sqrt{ 12 \frac{N}{d} - 3d^{2}} = \sqrt{9(a-b)^2} \lt 3d$, while
$\frac{3d-3(a-b)}{6} =b$.
 Furthermore, the expression in (\ref{EQU03}) results in a positive integer,
 as $3(a-b) = 3(d-2b)$ and $3d$ have
 the same parity. Thus for $d$ odd, setting
 $12 \frac{N}{d}-3d^{2} = 9(2r+1)^{2}$
 for some $r \in \mathbb{N}\cup \{ 0\}$, one finds $N$ is given by (\ref{EQU04}). However, as $a=\frac{3d+3(2r+1)}{6} \lt d$, the values of $r$ must be restricted to $0\leq r\lt \frac{d-1}{2}$. 
 
 Similarly for $d$ even, setting
 $12\frac{N}{d}-d^{2} = 9(2r)^{2}$,
 for some $r \in \mathbb{N}\cup \{ 0\}$, one finds $N$ is given by (\ref{EQU05}). However, as $a=\frac{3d+3(2r)}{6} \lt d$, the values of $r$ must be restricted to $0 \leq r \lt \frac{d}{2}$. 

 Now suppose an integer $N>1$ can be represented
 as $N=a^{3}-b^{3}$, for some $a,b\in\mathbb{N}$, where $a>b$ and having an odd divisor $d$ of
$N$, satisfying the criterion of Theorem \ref{THM01}. Then $a-b=d$ and $a^{2}+ab+b^{2}=\frac{N}{d}$. By employing an analogous argument to the one above, we can show that $a$ is again given by (\ref{EQU03}) as $\sqrt{12\frac{N}{d}-3d^{2}}=\sqrt{9(a+b)^{2}}>3d$, with $N$ given
by (\ref{EQU04}), but now for values of $r\gt \frac{d-1}{2}$. Similarly, for the case of $d$ even, we can show that $N$ is again given by (\ref{EQU05}), but now for values of $r\gt \frac{d}{2}$. 
\end{proof}

In what follows, we shall use the first result of Theorem \ref{THM02} to determine those positive integers less than or equal to $1729$ that
 can be represented as a sum of cubes of two positive integers in two different ways. As a result we can deduce the following result of Ramanujan:
\begin{corollary} \label{COR2}
 The smallest positive integer that can
  be represented as a sum of two cubes of two positive integers in two different ways is $1729$.
\end{corollary}
\begin{proof}
 From the equality $N=a^{3}+b^{3}=(a+b)(a^{2}-ab+b^{2})$, if a number $N$
 can be represented as a sum of two positive cubes, with $d=a+b$ odd, then
 $N=d((d-b)^{2} + b(d-b) + b^{2})$ must be odd, irrespective of the parity
 of $b$,
 while clearly $N$ is even when $d$ is even.
 In addition from equation (\ref{EQU04}), observe for all $d \geq 19$
 and odd, $N\geq 1843 \gt 1729$ for all $r \geq 0$, while from equation (\ref{EQU05}) for $d\geq 20$ and even $N \geq 2000 \gt 1729$ for all $r \geq 0$. Now as $d=1=a+b$ has no solutions in positive integers $a,b$, we need only for $d$ odd, examine the possibility of equality between the following algebraic expressions for $N$:
\begin{align}
  d&=3, \;& N&=9r^{2}+9r+9 \equiv 0 \; (\mathrm{mod}\;3) \label{EQU07} \\
  d&=5, \;& N&=15r^{2}+15r+35 \equiv 2 \; (\mathrm{mod}\;3) \label{EQU08} \\
  d&=7, \;& N&=21r^{2}+21r+91 \equiv 1 \; (\mathrm{mod}\;3) \label{EQU09} \\
  d&=9, \;& N&=27r^{2}+27r+189 \equiv 0 \; (\mathrm{mod}\;3) \label{EQU10}\\
  d&=11, \;& N&=33r^{2}+33r+341 \equiv 2 \; (\mathrm{mod}\;3) \label{EQU11} \\
  d&=13, \;& N&=39r^{2}+39r+559 \equiv 1 \; (\mathrm{mod}\;3) \label{EQU12} \\
  d&=15, \;& N&=45r^{2}+45r+855 \equiv 0 \; (\mathrm{mod}\;3)  \label{EQU13} \\
  d&=17, \;& N&=51r^{2}+51r+1241 \equiv 2 \; (\mathrm{mod}\;3) \label{EQU14} \\
  d&=19, \;& N&=57r^{2}+57r+1729 \equiv 1 \; (\mathrm{mod}\;3) \label{EQU90},
\end{align}
 and for $d$ even, examine the possibility of equality between the following
 expressions for $N$:
\begin{align}
  d&=2, \; &N&=6r^{2}+2 \equiv 2 \; (\mathrm{mod}\;6) \label{EQU15} \\
  d&=4, \; &N&=12r^{2}+16 \equiv 4 \; (\mathrm{mod}\;6) \label{EQU16} \\
  d&=6, \; &N&=18r^{2}+54 \equiv 0 \; (\mathrm{mod}\;6) \label{EQU17} \\
  d&=8, \; &N&=24r^{2}+128 \equiv 2 \; (\mathrm{mod}\;6) \label{EQU18} \\
  d&=10, \;& N&=30r^{2}+250 \equiv 4 \; (\mathrm{mod}\;6) \label{EQU19} \\
  d&=12, \;& N&=36r^{2}+432 \equiv 0 \; (\mathrm{mod}\;6) \label{EQU20} \\
  d&=14, \;& N&=42r^{2}+686 \equiv 2 \; (\mathrm{mod}\;6) \label{EQU21} \\
  d&=16, \;& N&=48r^{2}+1024 \equiv 4 \; (\mathrm{mod}\;6) \label{EQU22} \\
  d&=18, \;& N&=54r^{2}+1458 \equiv 0 \; (\mathrm{mod}\;6) \label{EQU23} .
\end{align}

Let $N(d)$ denote the finite set of positive integers generated either by equation (\ref{EQU04}) or (\ref{EQU05}), for the restricted values of $r$ given by $0\leq r \lt \frac{d-1}{2}$ or $0\leq r \lt \frac{d}{2}$, respectively. Clearly one needs only compare those sets $N(d)$, where $N$ satisfies the same congruence modulo $3$ or $6$. Moreover, as each of the expressions for $N$ are clearly monotone increasing for $r\geq 0$, it will suffice for each of the three divisors $d_{1}<d_{2}<d_{3}$, corresponding to the same residue class, to
compare the maximum element of $N(d_{1})$ with the minimum element of $N(d_{2})$, and the maximum element of $N(d_{2})$ with the minimum element of $N(d_{3})$, to ascertain any pairwise intersections between the sets
$N(d_{1})$, $N(d_{2})$, and $N(d_{3})$. To this end, if one denotes the minimum and maximum elements of $N(d)$ by $N_{\min}(d)$ and $N_{\max}(d)$, respectively, then $N_{\min}(d)$ occurs when $r=0$, while $N_{\max}(d)$ occurs when $r=\frac{d-1}{2}-1$ and $r=\frac{d}{2}-1$, for $d$ odd and even, respectively. We now need only consider the following two cases:

\bigskip
\noindent {\bf Case 1: $d$ odd:}
Considering equations (\ref{EQU07}), (\ref{EQU10}), and (\ref{EQU13}) one finds $N_{\max}(3)=9<N_{\min}(9)=189$ and $N_{\max}(9)=513<N_{\min}(15)=855$, so there are no pairwise intersection between the sets $N(3)$, $N(9)$ and $N(15)$. Considering equations (\ref{EQU09}), (\ref{EQU12}), and (\ref{EQU90}) one finds $N_{\max}(7)=217<N_{\min}(13)=559$, while $N_{\max}(13)=N_{\min}(19)=1729$ and so $N(13)\cap N(19)=\{ 1729\}$. Moreover, from (\ref{EQU03}) one finds that for $1729\in N(13)$, $1729=1^{3}+12^{3}$, while for $1729\in N(19)$ one has $1729=9^{3}+10^{3}$. Finally considering equations (\ref{EQU08}), (\ref{EQU11}), and (\ref{EQU14}) one finds $N_{\max}(5)=65<N_{\min}(11)=341$ and $N_{\max}(11)=1001<N_{\min}(17)=1241$, so there are no pairwise intersection between the sets $N(5)$,$N(11)$ and $N(17)$.

\bigskip
\noindent {\bf Case 2: $d$ even:}
Considering equations (\ref{EQU17}), (\ref{EQU20}), and (\ref{EQU23}), one finds $N_{\max}(6)=126<N_{\min}(12)=432$ and $N_{\max}(12)=1332<N_{\min}(18)=1458$, so there are no pairwise intersection between the sets $N(6)$, $N(12)$, and $N(18)$. Considering equations (\ref{EQU15}), (\ref{EQU18}), and (\ref{EQU21}), one finds $N_{\max}(2)=2<N_{\min}(8)=128$ and $N_{\max}(8)=344<N_{\min}(14)=686$, so there are no pairwise intersection between the sets $N(2)$, $N(8)$, and $N(14)$. Finally considering equations (\ref{EQU16}), (\ref{EQU19}), and (\ref{EQU22}), one finds $N_{\max}(4)=28<N_{\min}(10)=250$ and $N_{\max}(10)=730<N_{\min}(16)=1024$, so there are no pairwise intersection between the sets $N(4)$, $N(10)$, and $N(16)$. 

\bigskip

Thus $N=1729$ is the positive integer with the desired arithmetic property.
\end{proof}

In what follows, we shall use the second result of Theorem \ref{THM02}, to derive the generating functions for an infinite subset of those pairs of positive integers $(A_{n},B_{n})\not= (A'_{n},B'_{n})$ satisfying
$A_{n}^{3}+B_{n}^{3}={A'_{n}}^{3}+{B'_{n}}^{3}$, which are
distinct from Ramanujan's ``near integer'' solutions to $a_{n}^{3}+b_{n}^{3}=c_{n}^{3}+(-1)^{n}$.

\begin{corollary}
There are infinitely many pairs of positive integers $(A_{n},B_{n})$ and
$(A'_{n},B'_{n})$ with $(A_{n},B_{n})\not= (A'_{n},B'_{n})$ and such that
$A_{n}^{3}+B_{n}^{3}=A'^{\,3}_n+B'^{\,3}_n$. Moreover, an infinite
subset of these pairs of positive integers denoted $(a_{n},b_{n})$,
$(a'_{n},b'_{n})$, respectively, are the coefficients of $x^{n}$ for
$n\geq 1$, in the following generating functions:
\begin{align*}
\sum_{n=0}^{\infty}a_{n}x^{n} &=  \frac{34x^{2}-47x+6}{(1-x)(x^{2}-16x+1)} \\
\sum_{n=0}^{\infty}b_{n}x^{n} &=  \frac{-16x^{2}+68x-3}{(1-x)(x^{2}-16x+1)}\end{align*}
\begin{align*}
\sum_{n=0}^{\infty}a'_{n}x^{n} &=  \frac{-9x^{2}-44x+4}{(1-x)(x^{2}-16x+1)} \\
\sum_{n=0}^{\infty}b'_{n}x^{n} &=  \frac{33x^{2}-31x+5}{(1-x)(x^{2}-16x+1)}.
\end{align*}
\end{corollary}
\begin{proof}
Recall that the infinite set of positive integers $N(d)$ that can be represented as a difference of two cubes of two positive integers, having a prescribed odd divisor $d$, is given by
\[
N=\frac{d}{12}(9(2r+1)^{2}+3d^{2}),
\]
where $r\gt \frac{d-1}{2}$. Setting $d=1$ and $d=7$, one finds the elements of $N(1)$ and $N(7)$ are given by $N=3r^{2}+3r+1\equiv 1 \; (\mathrm{mod}\;3)$ and $N=21s^{2}+21s+91 \equiv 1\; (\mathrm{mod}\;3)$, with $r\gt 0$ and $s\gt 3$, respectively. Upon equating these two quadratic forms and completing the square, yields the Diophantine equation $X^{2}-7Y^{2}=114$, where $X=2r+1\gt 1$ and $Y=2s+1\gt 7$.

To help generate an infinite subset of integer solutions to $X^{2}-7Y^{2}=114$, we first examine the elements of the real quadratic field $\mathbb{Q}(\sqrt{7})=\{ a+b\sqrt{7}:a,b\in\mathbb{Q}\}$. The norm of an element $a+b\sqrt{7}\in\mathbb{Q}(\sqrt{7})$ is defined as
\[
N(a+b\sqrt{7})=(a+b\sqrt{7})(a-b\sqrt{7})=a^{2}-7b^{2},
\]
and a specific element $u+v\sqrt{7}\in\mathbb{Q}(\sqrt{7})$, is called a unit if $N(u+v\sqrt{7})=1$. Thus it suffices to find an infinite subset of elements $X+Y\sqrt{7}\in\mathbb{Q}(\sqrt{7})$, whose norm $N(X+Y\sqrt{7})=114$. Now in general, a unit $u+v\sqrt{d}\in\mathbb{Q}(\sqrt{d})$, where $d$ is a positive non-square integer, can act on an element $X+Y\sqrt{d}\in\mathbb{Q}(\sqrt{d})$, having a norm $N(X+Y\sqrt{d})=k$, for some $k\in\mathbb{Z}$, to produce another element in $\mathbb{Q}(\sqrt{d})$, again having a norm equal to $k$. This action is defined by the following algebraic identity
\begin{equation}\label{EQU24}
(uX+dvY)^{2}-d(vX+uY)^{2}=(u^{2}-dv^{2})(X^{2}-dY^{2})=k,
\end{equation}
where $N(u+v\sqrt{d})=1$ and $N(X+Y\sqrt{d})=k$. This is known as the Brahmagupta identity \cite{still}. Thus by fixing a unit $u+v\sqrt{d}\in\mathbb{Q}(\sqrt{d})$ and an element $X+Y\sqrt{d}\in\mathbb{Q}(\sqrt{d})$, corresponding to a minimal integer solution to $u^{2}-dv^{2}=1$ and $X^{2}-dY^{2}=k$, respectively, one can by repeated application of (\ref{EQU24}), produce an infinite subset of integer solutions to $X^{2}-dY^{2}=k$. Now in the case of $d=7$, one finds that the minimal integer solutions to $X^{2}-7Y^{2}=114$ and $u^{2}-7v^{2}=1$, are $(X,Y)=(11,1)$ and $(u,v)=(8,3)$, respectively. Setting $d=7$, $k=114$, $u=8$, $v=3$, $X=X_{n}$ and finally $Y=Y_{n}$ in (\ref{EQU24}), we can generate from the left hand side of (\ref{EQU24}) another solution $(X_{n+1},Y_{n+1})$ to $X^{2}-7Y^{2}=114$ via the coupled recurrence relations
\begin{align}
X_{n+1} &= 8X_{n}+21Y_{n}\label{EQU25}\\
Y_{n+1} &=  3X_{n}+8Y_{n},\label{EQU26}
\end{align}
with $(X_{0},Y_{0})=(11,1)$. A simple parity check establishes that the integer solutions $(X_{n},Y_{n})$ are an ordered pair of odd integers, with $X_{n}>1$ and $Y_{n}>7$, for $n\geq 1$. Setting $F(x)=\sum_{n=0}^{\infty}X_{n}x^{n}$ and $G(x)=\sum_{n=0}^{\infty}Y_{n}x^{n}$, one finds after multiplying (\ref{EQU25}) and (\ref{EQU26}) by $x^{n+1}$ and summing the index variable $n$ over all non-negative integers, that
\begin{align*}
11 &=  (1-8x)F(x)-21xG(x) \\
1 &=  -3xF(x)+(1-8x)G(x).
\end{align*}
Upon solving these pairs of simultaneous equations for $F(x)$ and $G(x)$, one deduces that
\[
F(x)=\frac{-67x+11}{x^{2}-16x+1}\quad \mbox{and}\quad G(x)=\frac{25x+1}{x^{2}-16x+1} \ .
\]
Now from definition and (\ref{EQU03}), the elements of the set $N(1)$ are of the form $a^{3}-b^{3}$, with $a=\frac{1+X_{n}}{2}$ and $b=a-1=\frac{X_{n}-1}{2}$, while the elements of the set $N(7)$ are of the form $a^{3}-b^{3}$, with $a=\frac{7+Y_{n}}{2}$ and $b=a-7=\frac{Y_{n}-7}{2}$. Moreover, recall that
\begin{equation}\label{EQU27}
\left(\frac{1+X_{n}}{2}\right)^{3} - \left(\frac{X_{n}-1}{2}\right)^{3} = \left(\frac{7+Y_{n}}{2}\right)^{3} - \left(\frac{Y_{n}-7}{2}\right)^{3}.
\end{equation}
Clearly, the generating functions for the sequences $\frac{X_{n}+1}{2}$ and $\frac{X_{n}-1}{2}$ are given by
\[
\frac{1}{2} \left(F(x)+\frac{1}{1-x} \right) = \frac{34x^{2}-47x+6}{(1-x)(x^{2}-16x+1)}
\]
and
\[
\frac{1}{2}\left(F(x)-\frac{1}{1-x}\right) = \frac{33x^{2}-31x+5}{(1-x)(x^{2}-16x+1)},
\]
respectively. Similarly, the generating functions for the sequences $\frac{Y_{n}+7}{2}$ and $\frac{Y_{n}-7}{2}$ are given by
\[
\frac{1}{2}\left(G(x)+\frac{7}{1-x} \right) = \frac{-9x^{2}-44x+4}{(1-x)(x^{2}-16x+1)}
\]
and
\[
\frac{1}{2}\left(G(x)-\frac{7}{1-x}\right) = \frac{-16x^{2}+68x-3}{(1-x)(x^{2}-16x+1)},
\]
respectively. After setting $a_{n}=\frac{X_{n}+1}{2}$, $a'_{n}=\frac{Y_{n}+7}{2}$, $b_{n}=\frac{Y_{n}-7}{2}$ and $b'_{n}=\frac{X_{n}-1}{2}$ one finds upon rearranging (\ref{EQU27}) that the result is now established.
\end{proof}
By repeated application of the coupled recurrence relations in (\ref{EQU25}) and (\ref{EQU26}), we can produce examples of arithmetic identities, showing equal sums of two cubes as follows:
\begin{align*}
55^{3}+17^{3} &= 24^{3}+54^{3}\\
867^{3}+324^{3} &= 331^{3}+866^{3}\\
13810^{3}+5216^{3} &= 5223^{3}+13809^{3}.
\end{align*}

\begin{thebibliography}{9}

\bibitem{broughan} K. Broughan, Characterizing the sum of two cubes. \emph{J. Integer Sequences} {\bf 6} (2003), \href{https://cs.uwaterloo.ca/journals/JIS/VOL6/Broughan/broughan25.pdf}{Article 03.4.6}.

\bibitem{still} J. Stillwell,  {\it Mathematics and Its History}, Springer, 2002.

\bibitem{jorgen} J. Veisdal, The Hardy-Ramanujan number $1729$. Available at \url{https://jorgenveisdal.medium.com/the-hardy-ramanujan-number-1729-929766161647}.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent
2020 \emph{Mathematics Subject Classification}:~Primary 11A15.
Secondary 11A67.

\noindent
\emph{Keywords:} cube, sum of two cubes,
 generating function,
 Brahmagupta identity.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A001235},
\seqnum{A004999},
\seqnum{A011541},
\seqnum{A343708}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received December 24 2021;
revised versions received  January 2 2022; April 8 2022.
Published in {\it Journal of Integer Sequences}, April 10 2022.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                


