Ramanujan numbers

$$\def\sp{\;\;\;\;} \def\Ree{\text{Re}} \def\qed{\square} \def\S{} \def\fix[#1,#2,#3,#4][#5,#6,#7,#8][#9]{ #1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 & #9\\ } \def\fiy[#1,#2,#3,#4][#5,#6,#7,#8]{ #1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 \\ } $$

Ramanujan Numbers

Mathematical Miniature 22.1

John Butcher

1. Introduction The aim of this miniature is to give a new solution to the Diophantine equation

\[ x^3 + y^3 = u^3+v^3, \;\;\;\;\; x,y,u,v \in \Z.\tag{1} \]

The result found in this essay gives the general solution in terms of two parameters in the ring $R:=\Z\big(\sqrt{-3}\big)$.

Depending on the signs of the integers in any particular solution of (1), we obtain a solution to one or the other of

\[ x^3 + y^3 = u^3+v^3, \;\;\;\;\; x,y,u,v \in \Z^+,\tag{2} \]

and

\[ x^3 + y^3 +z^3 = w^3, \;\;\;\;\;x,y,z,w \in \Z^+.\tag{3} \]

For example, the solution

\[ [x,y,u,v]=[10, -1, -9, 12] \]

to (1) implies the solution

\[ [x,y,u,v]=[10,9,1,12], \]

to (2) and the solution

\[ [x,y,u,v]=[6, -4, 5, 3] \]

to (1), implies the solution

\[ [x,y,z,w]=[3,4,5,6] \]

to (3).

The values of $x^3+y^3$ in solutions to (2) are known as Ramanujan Numbers. The historical event which made (2) into a famous problem, was recounted by C. P. Snow, in his foreword to [G. H. Hardy, 1940] . The problem was also discussed in [Joseph H. Silverman, 1993] .

In Section 2, we will consider some properties of $R$ and in section 3 we will present a solution to (1). This leads, in Section 4, to an Algorithm, for generating all possible solutions, in Section 6. Finally, in Section 5, it is shown how to construct primitive solutions, with arbitrarily large values.

2. The ring $\Z\big(\sqrt{-3}\big)$ For $\xi=a+b\sqrt{-3} \in R$, the norm is defined as $\| \xi\| = \xi\overline \xi=a^2+3b^2$. If $\xi=a+b\sqrt{-3}$, $\eta=c+d\sqrt{-3}$, then $\xi\eta =(ac-3bd) +(ad+bc)\sqrt{-3}$.

We will consider the question: which odd primes greater than $3$ are equal to $\| \xi\|$ for some $\xi$.

Lemma 1 Let $p$ be a prime greater than $3$, then there exists $a+b\sqrt{-3} \in R$ with $p\nmid a$, $p\nmid b$, such that

\[ a^2+3b^2 \equiv 0 \bmod p,\tag{4} \]

if and only if $p\equiv 1 \bmod 6$.

Proof Choose the integer $c$ such that $bc=1 \bmod p$ and multiply (4) by $c$ and write $d=ac$. It follows that $-3 \equiv d^2 \bmod p$, implying that, using Legendre symbols,

\[ \begin{array}{rll} \big(\tfrac{-3}{p}\big)\!\!\!&= \big(\tfrac{-1}{p}\big) \big(\tfrac{3}{p}\big) \!\!\!&= (-1)^{\frac{p-1}2} (-1)^{\frac{p-1}2}\big(\tfrac{p}{3}\big)\\ &=\big(\tfrac{p}{3}\big) &=\left\{ \begin{array}{@{}rl} 1, & p\equiv 1 \bmod 6,\\ -1, & p\equiv 5 \bmod 6.\; \qed \end{array} \right. \end{array} \]

Denote $P$ as the set of primes which are congruent to $1\bmod 6$. For given $p\in P$, denote $N = \{1,2,\dots, \tfrac{p-1}2\}$.
Lemma 2 Let $p \in P$, then there exist integers $a,b\in N$ such that

\[ a^2+3b^2 \equiv 0 \bmod p.\tag{5} \]

Proof Replace $a$ by $a'$ in (5), where $a= np \pm a'$ with $a'\in N$ and similarly for $b$. $\;\qed$
Theorem 3 Let $p\in P$; then unique $|a|$ and $|b|$ exist such that

\[ a^2+3b^2 = p, \tag{6} \]

Proof The proof is by induction for $p=7, 13, 19, \dots\in P$. For $p=7$, it is verified that $2^2+3 (1)^2=p$. It remains to prove the result for $p\in P$, $p>7$, where it is assumed to hold for all $q\in P$, such that $q < p$. From Lemma 2, $a,b$, exist such that $a^2+3b^2=pQ$, with $Q$ a product of prime powers. We will show that this statement is also true with $Q=1$. It is not possible that $p\mid Q$ because

\[ a^2+3b^2 \leq (\tfrac{p-1}2)^2 + 3(\tfrac{p-1}2)^2 < p^2. \]

The proof continues by considering a series of propositions which make it possible to exclude all possible prime divisors of $Q$. In each case, for a possible divisor $g$, we will show that there exists $a'$, $b'$ such that $a'^2+3b'^2=pQ'$ with $Q' < Q$. In this proof only, the symbol $\pmb\Rightarrow$ is used to introduce values of $a', b', Q'$.
  1. $\gcd(a,b)=g>1$ $\pmb\Rightarrow$ $a'=a/g$, $b'=b/q$. $Q'=Q/g^2$.
  2. $2\mid Q$.
    1. $a,b$ even. This reduces to 1.
    2. $a,b$ odd.
      1. $4\mid (a+ b)$ $\pmb\Rightarrow$ $a'=(a-3b)/4$, $b'=(a+ b)/4$. $Q'=(Q/4)$
      2. $4\mid (a- b)$ $\pmb\Rightarrow$ $a'=(a+3b)/4$, $b'=(a- b)/4$. $Q'=(Q/4)$
  3. $3\mid Q$. This implies $3\mid a$ $\pmb\Rightarrow$ $a'=b$, $b'=a/3$. $Q'=Q/3$.
  4. $q\mid Q$, for $q$ prime and $q\equiv 5 \bmod 6$. It follows that case 1. applies with $g=q$.
  5. $q\mid Q$, for $q\in P$.
    1. $q\mid a$, $q\mid b$. Reduces to case 1.
    2. $q\nmid a$, $q\nmid b$. $(c+d\sqrt{-3})(c-d\sqrt{-3})(a+b\sqrt{-3})=pqQ$.
      1. $q\mid (c+ d\sqrt{-3})(a+b\sqrt{-3})$ $\pmb\Rightarrow$ $a'=(ac-3bd)/q$, $b'=ad+bc$, $Q'=Q/q$.
      2. $q\mid (c- d\sqrt{-3})(a+b\sqrt{-3})$ $\pmb\Rightarrow$ $a'=(ac+3bd)/q$, $b'=ad-bc$, $Q'=Q/q$.

We now consider the primes of $R$ and factorization in $R$.

Remark 4 The primes of $R$ are
  • 2
  • $1\pm\sqrt{-3}$
  • $\sqrt{-3}$
  • Prime numbers $p\equiv 5 \bmod 6$
  • $a\pm b\sqrt{-3}$, with $a,b\in \Z^+$, and $a^2+3b^2\in P$.
Remark 5 The product of two primes of $R$ has unique factorization with the exception of

\[ 4 = 2^2 = (1 + \sqrt{-3}) (1-\sqrt{-3}). \]


3. Solution to cubic equation We first state the solution to an introductory equation.
Lemma 6 The general solution to

\[ AB=CD, \;\;\;\; A,B,C,D \in \Z^+ \tag{7} \]

is

\[ A = ij, B = k\ell, C = ik, D = j\ell, \;\;\;\; i,j,k,\ell \in \Z^+. \tag{8} \]


Proof Let $i=\gcd(A,C)$, $j=A/i$, $\ell =\gcd(B,D)$, $k=B/\ell$. $\;\qed$
Consider two Diophantine equations

\[ \begin{array}{rlr} x^3+y^3 \!\!\!&= u^3+v^3,& (9)\\ \sp\sp\sp\sp\sp\sp\sp\sp a(a^2+3b^2)\!\!\! &= c(c^2+3d^2)& \sp\sp\sp \sp\sp\sp\sp\;\;\; (10) \end{array} \]

We will, in each case, consider primitive solutions.
The next result is easily verified and is given without proof.
Lemma 7 $(x,y,u,v)$ is a primitive solution to (9) if and only if $(a,b,c,d)$ is a primitive solution to (10), where

\[ \begin{bmatrix} a\\b \end{bmatrix} = T \begin{bmatrix} x\\y \end{bmatrix}, \begin{bmatrix} c\\d \end{bmatrix} = T \begin{bmatrix} u\\v \end{bmatrix}, \]

with

\[ \begin{array}{rl} T \!\!\!&= \left\{ \begin{array}{l l} \,\;\;\begin{bmatrix} 1 & 1\\1 & -1 \end{bmatrix}, & x+y \text{ odd},\\ \frac12\begin{bmatrix} 1 & 1\\1 & -1 \end{bmatrix}, & x+y \text{ even}, \end{array} \right.\\ T^{-1}\!\!\! &= \left\{ \begin{array}{l l} \frac12\begin{bmatrix} 1 & 1\\1 & -1 \end{bmatrix}, & x+y \text{ odd},\\ \,\;\;\begin{bmatrix} 1 & 1\\1 & -1 \end{bmatrix}, & x+y \text{ even}. \end{array} \right. \end{array} \]

We will now focus on (10), but written in a slightly different form.

\begin{align} \widetilde a(a^2+3b^2) &= \widetilde c(c^2+3d^2), \tag{11}\\ \widetilde a &= a, \sp\sp \sp\sp\widetilde c =c. & \tag{12} \end{align}

We will use Lemma 6 to solve (11) and then identify the free parameters by requiring them to satisfy (12).
Lemma 8 The general solution to (11) is

\begin{align} \widetilde a &= r Y, \tag{13}\\ a^2+3b^2 &= XZ, \tag{14}\\ \widetilde c &= r X, \tag{15}\\ c^2+3d^2 &= YZ, \tag{16} \end{align}

where

\begin{alignat}{3} X &= \xi \overline \xi &&=\alpha^2+3 \beta^2,\sp & \xi &=\alpha + \beta\sqrt{-3}, \tag{17}\\ Y &= \eta\overline\eta &&= \gamma^2+3 \delta^2, & \eta &=\gamma + \delta\sqrt{-3},\tag{18}\\ Z &=\zeta\overline\zeta &&=s^2+3 t^2, & \zeta &=s + t\sqrt{-3}, \tag{19} \end{alignat}

and $r,s,t,\alpha,\beta, \gamma, \delta$ are parameters.

Proof Use Lemma 6 and note that

\[ Z=\gcd(\alpha^2+3 \beta^2, \gamma^2+3 \delta^2), \]

which is necessarily of the form $s^2+3 t^2$. $\;\qed$
Discussion 9 To eliminate $r,s,t$, use the conditions $\widetilde a =a$, $\widetilde c=c$ using

\begin{alignat}2 \widetilde a &= r \zeta\overline\zeta&&= r(\gamma^2+3 \delta^2), \tag{20}\\ \widetilde c &= r \xi\overline \xi &&=r(\alpha^2+3 \beta^2), \tag{21}\\ a &= \Ree \xi\zeta&&=s\alpha - 3 t\beta, \tag{22}\\ c &= \Ree \eta\zeta &&=s\gamma - 3 t\delta, \tag{23} \end{alignat}

so that $r,s,t$ satisfy the homogeneous linear system

\[ \begin{bmatrix} \gamma^2+3\delta^2 & -\alpha & 3\beta\\ \alpha^2+3\beta^2 & -\gamma & 3\delta \end{bmatrix} \begin{bmatrix} r\\s\\t \end{bmatrix} =0, \]

with solution

\[ \begin{bmatrix} r\\s\\t \end{bmatrix}= G^{-1}\begin{bmatrix} 3(\beta \gamma-\alpha\delta)\\ 9(\beta^3-\delta^3) + 3(\alpha^2\beta - \gamma^2\delta)\\ \alpha^3-\gamma^3 + 3( \alpha \beta^2 - \gamma\delta^2) \end{bmatrix}, \]

where $G^{-1}$ is introduced to reduce $\gcd(r,s,t)$ to $1$, if necessary.

4. Algorithm and sample solutions Using the results of Lemmas 7 and 8, and Discussion 9, an algorithm can be constructed.
  1. Choose $\alpha+\beta\sqrt{-3}, \gamma+\delta\sqrt{-3}\in R$
  2. Evaluate $r,s,t$
  3. Evaluate $a,b,c,d$
  4. Evaluate $x,y,u,v$
It is found computationally that there are exactly $25$ solutions to (9) with $x^3+y^3\le 10^6$ and $31$ solutions to (10) with $w\le 100$. These are shown in Tables 1 and 2 respectively.
5. Extreme values
Theorem 10 Primitive solutions to (9), with $x,y,u,v>0$, exist with arbitrarily high values of $x^3+y^3=u^3+v^3$.
Proof For $[\alpha,\beta,\gamma,\delta]=[n,1,n,0]$ with $3\nmid n$, details of the solution are found to be

\begin{align} [r,s,t]&=[n,n^2+3,n]\\ x&= n^3+2n^2+3,\\ y&= n^3-2n^2-3,\\ u&=n^3+n^2+3n,\\ v&=n^3-n^2+3n,\\ x^3+y^3=u^3+v^3&=2n^3(n^2+3)(n^4+9n^2+9). \end{align}

Theorem 11 Primitive solutions to (10), with $x,y,z>0$, exist with arbitrarily high values of $w$.
Proof. For $[\alpha,\beta,\gamma,\delta]=[n,1,0,n]$, with $3\nmid n$, details of the solution are found to be

\begin{align} [r,s,t]&=[-3n^2, 3n^2+9,n^2+3n],\\ x&=6n^4-3n^3-9n^2-9n,\\ y&=8n^4+9n^3-6n^2-9,\\ z&=10n^4-9n^3+6n^2+9,\\ w&=12n^4-3n^3+9n^2-9n. \end{align}


Table 1. Solutions to (9) with $x^3+y^3 \le 10^6$

\[ \begin{array}{rrrr|rrrr|r} \alpha & \beta & \gamma & \delta & x & y & u & v & x^3+y^3\\ \hline \fix[0, 2, 1, -1][12, 1, 9, 10][1729] \fix[0, 1, 1, 1][9, 15, 2, 16][4104] \fix[1, 1, -2, -1][19, 24, 27, 10][20683] \fix[0, 1, 2, 0][33, 15, 2, 34][39312] \fix[0, 1, 1, -1][33, 16, 9, 34][40033]% \fix[2, 1, -3, -2][26, 36, 17, 39][64232] \fix[1, 2, -2, 2][31, 33, 40, 12][65728] \fix[1, 1, 1, 2][38, 43, 51, 12][134379] \fix[1, 1, -1, -3][29, 50, 8, 53][149389] \fix[1, 2, -3, 1][17, 55, 54, 24][171288]% \fix[1, 1, -2, -4][22, 57, 9, 58][195841] \fix[1, 3, 3, 3][22, 59, 3, 60][216027] \fix[0, 2, 1, -3][51, 58, 30, 67][327763] \fix[1, 3, 1, 4][56, 61, 69, 42][402597] \fix[2, 1, 2, 2][69, 48, 76, 5][439101]% \fix[2, 3, -5, 2][38, 73, 76, 17][443889] \fix[0, 1, 1, 2][71, 54, 15, 80][515375] \fix[1, 3, -2, -4][75, 64, 82, 51][684019] \fix[2, 0, -2, 1][41, 86, 89, 2][704977] \fix[0, 3, 3, -2][93, 11, 30, 92][805688]% \fix[4, 1, 7, 3][63, 84, 94, 23][842751] \fix[2, 2, -4, -1][33, 96, 97, 20][920673] \fix[0, 1, 1, -2][63, 89, 24, 98][955016] \fix[1, 5, 2, -4][98, 35, 59, 92][984067] \fix[1, 2, -3, -2][69, 92, 99, 29][994688] \end{array} \]

Table 2. Solutions to (10) with $w \le 100$

\[ \begin{array}{rrrr|rrr|r} \alpha & \beta & \gamma & \delta & x & y & z & w\\ \hline \fiy[0, 1, 1, 0][3, 4, 5, 6] \fiy[0, 2, 1, 1][1, 6, 8, 9] \fiy[0, 1, 2, -1][3, 10, 18, 19] \fiy[1, 0, -1, 1][7, 14, 17, 20] \fiy[1, 0, 2, 1][4, 17, 22, 25] \fiy[2, 4, -3, 1][18, 19, 21, 28] \fiy[0, 1, 2, 1][11, 15, 27, 29] \fiy[1, 1, 2, 1][2, 17, 40, 41] \fiy[1, 0, -1, 2][16, 23, 41, 44] \fiy[1, 3, -2, -1][3, 36, 37, 46] \fiy[1, 3, 2, 0][29, 34, 44, 53] \fiy[1, 0, -2, 3][12, 19, 53, 54] \fiy[1, 5, -3, -1][15, 42, 49, 58] \fiy[1, 3, -3, 1][22, 51, 54, 67] \fiy[1, 1, -5, 2][36, 38, 61, 69] \fiy[1, 2, -2, 4][7, 54, 57, 70] \fiy[1, 4, 4, -2][14, 23, 70, 71] \fiy[2, 1, 5, -4][34, 39, 65, 72] \fiy[1, 2, -2, 0][38, 43, 66, 75] \fiy[1, 3, 3, -1][31, 33, 72, 76] \fiy[1, 2, -6, -1][25, 48, 74, 81] \fiy[1, 7, -5, -2][19, 60, 69, 82] \fiy[1, 1, -3, 3][28, 53, 75, 84] \fiy[1, 1, -4, 1][50, 61, 64, 85] \fiy[1, 1, 3, -3][26, 55, 78, 87] \fiy[1, 0, -2, 2][21, 43, 84, 88] \fiy[1, 1, 2, -1][17, 40, 86, 89] \fiy[1, 2, 4, 2][25, 38, 87, 90] \fiy[1, 1, 4, -3][32, 54, 85, 93] \fiy[2, 4, 5, -1][19, 53, 90, 96] \fiy[2, 1, 2, -3][45, 69, 79, 97] \end{array} \]

References

;[G. H. Hardy, 1940]
A Mathematician's Apology, Cambridge: Cambridge University Press.
[Joseph H. Silverman, 1993]
Taxicabs and sums of two cubes, Am. Math. Monthly 100, 331-340.

$\to$ Pastimes