\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{\Ac}{\mathcal A}
\newcommand{\Bc}{\mathcal B}

\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 
Equal Sums of Two Distinct Like Powers
}
\vskip 1cm
\large
Samuel S. Wagstaff, Jr. \\
Center for Education and Research in Information Assurance \\
and Security, and Department of Computer Sciences\\
Purdue University\\
West Lafayette, IN 47907-1398\\
USA \\
\href{mailto:ssw@cerias.purdue.edu}{\tt ssw@cerias.purdue.edu} \\
\end{center}

\vskip 0.2in

\begin{abstract}
We study the equation $a^j+b^j=c^k+d^k$ for positive
integers $a$, $b$, $c$, $d$, and $2<j<k$.
Two heuristic arguments correctly predict the cases in which
the equation has primitive solutions.
\end{abstract}

\section{Introduction}\label{intro}

Let $(S_n^{(k)})_{n\ge1}$ denote the
sequence of sums of two positive $k$-th powers of integers.
We consider mostly the sequences $(S_n^{(k)})_{n\ge1}$
with $3\le k\le 6$:
\seqnum{A004999}, \seqnum{A003336}, \seqnum{A003347}, and
\seqnum{A003358} in the OEIS \cite{OEIS}.
For integers $2<j<k$, we investigate the numbers common to
the two sequences $(S_n^{(j)})_{n\ge1}$ and $(S_n^{(k)})_{n\ge1}$.
The numbers $(a^k)^j+(b^k)^j=(a^j)^k+(b^j)^k$,
for positive integers $a$ and $b$, appear trivially in both sequences.
We are more interested in nontrivial common elements.

Equivalently, we study the equation $a^j+b^j=c^k+d^k$
for positive integers $a$, $b$, $c$, $d$.
We are interested mostly in the case $2<j<k$, but we begin
by reviewing the case $j=k$, which has been studied extensively.

Many solutions in integers are known for the equation
$a^j+b^j=c^j+d^j=N$ when $j=2$, 3, and 4.
We exclude trivial solutions with $\{a,b\}=\{c,d\}$.
Only primitive solutions, those with $\gcd(a,b,c,d)=1$, are considered
because all other solutions may be derived from the primitive ones.
For example, the solution $399^4+402^4=177^4+474^4$ would be ignored
because it is just $3^4$ times the solution $133^4+134^4=59^4+158^4$.

Theorem 412 in Hardy and Wright \cite{HW60} asserts that
some integers have arbitrarily many representations as
the sum of two cubes.
Parametric solutions are known for $j=2$, 3, and 4.
Equation (13.7.11) in Hardy and Wright \cite{HW60} gives a
parametric solution for the case $j=4$ and
Choudhry \cite{Cho91} offers another one.
Wroblewski \cite{Wro} lists all primitive solutions to $a^4+b^4=c^4+d^4$
with $a$, $b$, $c$, $d\le10^{14}$.
No primitive solution to $a^j+b^j=N=c^j+d^j$ is known with $j>4$.
According to Guy \cite[Sec.\ D1]{Guy94},
people have searched at least up to $N<10^{25}$ for solutions
in the case $j=5$.
Fermat's Last Theorem says there are no solutions with $d=0$.
Browning \cite{Bro02} used algebraic geometry to show that
primitive solutions with $j>4$ are rare if they exist at all.

We have searched for solutions to the equation
$a^j+b^j=c^k+d^k$ in integers $a$, $b$, $c$, $d$ with $2<j<k<11$.
There are many solutions with $j=2$ and all $k>2$.
We found primitive solutions in the three cases $j=3$, $k=4$, 5, and 6,
but none for other values of $2<j<k<11$.

When one studies the equation $a^j+b^j=c^k+d^k$ with $j<k$,
one ignores trivial identities such as
$(a^k)^j+(b^k)^j=(a^j)^k+(b^j)^k$,
even when $\gcd(a,b)=1$.

In case $j<k$ and $j\mid k$
some solutions with $\gcd(a,b,c,d)>1$ might be considered
if one wants to see all solutions, because sometimes
a common factor cannot be canceled.
For example, one solution to $a^3+b^3=c^6+d^6$ is
\begin{equation}
102^3+330^3=12^6+18^6 \label{eq1}
\end{equation}
and the common factor 6 of the four numbers cannot be canceled
since it appears to different powers on the two sides of the equation.
However, this solution comes from a solution to $w^3+x^3=y^3+z^3$.
If $k=\gcd(a,b,c,d)>1$ for a solution to $a^3+b^3=c^6+d^6$,
then this equation may be rewritten as $(kw)^3+(kx)^3=(ke)^6+(kf)^6$
or $k^3w^3+k^3x^3=(k^2e^2)^3+(k^2f^2)^3$ from which $k^3$ may be
canceled to give $w^3+x^3=(ke^2)^3+(kf^2)^3$, which is primitive.

A solution $(k^2a)^3+(k^2b)^3=(kc)^6+(kd)^6$ for some integer $k>1$
is easily derived from the solution $a^3+b^3=c^6+d^6$ by
multiplying by $k^6$, so it is ignored.
For example, $918^3+2970^3=36^6+54^6$ is just the solution
$102^3+330^3=12^6+18^6$ multiplied by $3^6$.
Likewise, we ignore solutions to $a^3+b^3=c^6+d^6$ with $a=c^2$ and $b=d^2$.

Similar reductions apply also whenever $j<k$ and $j\mid k$.
We tested the 11089 solutions to $w^4+x^4=y^4+z^4$ found by Wroblewski
\cite{Wro} to see whether one would give a solution to $a^4+b^4=c^8+d^8$.
None of them worked (because none had square values for both $w$ and $x$).

Lander \cite{Land} gave (\ref{eq1}) as a solution when $j=3$ and $k=6$.
He found parametric solutions to $a^j+b^j=c^k+d^k$
(and to similar equations with any number of terms on each side)
for every $2\le j\le k$, but none of his solutions are primitive.
His solution to $a^j+b^j=c^k+d^k$ is
\[
(pw^B)^j + (qw^B)^j = (w^A)^k + (w^A)^k,
\]
where $A$, $B$ and $w$ are positive integers that depend on
$j$, $k$, and the parameters $p$ and $q$.
For $j=5$, $k=8$, he gave a typical numerical solution
$(3\cdot122^3)^5 + (122^3)^5 = (122^2)^8 + (122^2)^8$.
For $j=3$, $k=5$, another numerical solution would be
$(4\cdot36^3)^3 + (2\cdot36^3)^3 = (36^2)^5 + (36^2)^5$.

The tables in the next section list only primitive solutions---those
with $\gcd(a,b,c,d)=1$ (other than $a=b=c=d=1$).

\section{The results} \label{results}

We used the methods described in Bernstein \cite{Ber00}
in the search for solutions.
One heap (data structure) held the sums $a^j+b^j$
and another one held the sums $c^k+d^k$.
The program compared their least elements as they were removed.
We used Algorithm 6 of Eisermann \cite{Eis} to reduce the
memory requirement of the program.
The computation was done on the Brown cluster
at Purdue's RCAC.

We used local constraints to accelerate the algorithm.
For instance, only five of the eleven residue classes modulo 11
are sums $c^5+d^5$, namely, $-2$, $-1$, 0, 1, 2 modulo 11.
The map $f(x)=x^3\bmod 11$ is a permutation
of the eleven classes.  Thus for each $a\pmod{11}$, if $a^3+b^3$
equals a sum of two fifth powers, then there are only five possible
values of $b\pmod{11}$.
For example, when $a\equiv3\pmod{11}$, we have $a^3\equiv5\pmod{11}$. 
Thus $b^3\bmod 11$ must be one of 4, 5, 6, 7, $8\pmod{11}$,
so $b\bmod 11$ must be one of 5, 3, 8, 6, $2\pmod{11}$.
To search these cases we ran five jobs, one for each possible
value of $b\bmod 11$ (and all possible values for $a$, $c$, and $d$).
We used the moduli 16, 11, 27, 29, 32, 19, 25,
for $k=4$, 5, 6, 7, 8, 9, 10, respectively, and most values of $j<k$.

If $c\le d\le M$, then $a^j+b^j=c^k+d^k\le 2M^k$,
so $a\le b\le L=(2M^k)^{1/j}$.
The number of pairs $a$, $b$ is about $L^2/2$.
The search for solutions examines more $a$, $b$ pairs
than $c$, $d$ pairs since $j<k$, and the naive running time
would be $O(L^2)$ or $O(M^{2k/j})$.
However, we rewrote the equation as $a^j-c^k=d^k-b^j$
and computed these differences instead of the sums.
This reduced the work to $O(M^{1+k/j})$.

For $j=3$, we used $M=10000$, 5000, 1400, 700, 350, 200, 100
for $k=4$, 5, 6, 7, 8, 9, 10, respectively.
For $j=4$, we used $M=18100$, 3500, 1100, 460, 230, 135
for $k=5$, 6, 7, 8, 9, 10, respectively.
We made similar effort in the other cases.
These limits kept the sums in range of 64-bit integer arithmetic
in the three cases where we found solutions
and in range of 128-bit integer arithmetic in the other cases.
They also kept the search times reasonable.

Tables \ref{Ta:sol34a} and \ref{Ta:sol34b}
show the primitive solutions to $0\le a^3+b^3=c^4+d^4=N$
with $0\le c\le d\le 10000$ in order by the size of $N$.

Note the repeated values of $c$ or $d$ in these solutions.
\begin{align}\nonumber
45^3 + 133^3 & = 39^4 + 19^4 \\ \nonumber
161^3 + 176^3 & = 39^4 + 52^4 \\ \nonumber
887^3 + 6457^3 & = 456^4 + 690^4 \\ \nonumber
2941^3 + 14771^3 & = 456^4 + 1338^4 \\ \nonumber
6377^3 + 7977^3 & = 227^4 + 935^4 \\ \nonumber
5528^3 + 8529^3 & = 398^4 + 935^4 \nonumber
\end{align}

\begin{table}[H]
\centering
\resizebox{.65\columnwidth}{!}{%
\begin{tabular}{|r|r|r|r||r|r|r|r|} \hline
$a$ & $b$ & $c$ & $d$ & $a$ & $b$ & $c$ & $d$ \\ \hline
17 & 24 & 8 & 11 & 3658 & 29849 & 825 & 2262 \\
45 & 133 & 19 & 39 & 7202 & 29977 & 225 & 2286 \\
161 & 176 & 39 & 52 & 26224 & 27217 & 167 & 2486 \\
641 & 960 & 133 & 170 & 18226 & 33641 & 396 & 2577 \\
993 & 1400 & 32 & 247 & 16101 & 35149 & 1225 & 2595 \\
840 & 1681 & 73 & 270 & 4401 & 37096 & 1644 & 2573 \\
1417 & 1634 & 78 & 291 & 11986 & 39881 & 288 & 2841 \\
41 & 3801 & 193 & 481 & 23097 & 42217 & 195 & 3059 \\
4272 & 4337 & 35 & 632 & 14521 & 46850 & 1959 & 3090 \\
887 & 6457 & 456 & 690 & 31249 & 44928 & 215 & 3318 \\
6377 & 7977 & 227 & 935 & 39893 & 42669 & 2261 & 3275 \\
5528 & 8529 & 398 & 935 & 32321 & 47936 & 981 & 3458 \\
8669 & 9043 & 60 & 1086 & 23645 & 56133 & 401 & 3713 \\
2941 & 14771 & 456 & 1338 & 35653 & 61979 & 1470 & 4086 \\
9928 & 16849 & 1145 & 1418 & 17432 & 65969 & 1806 & 4097 \\
2201 & 19721 & 1239 & 1519 & 39777 & 69704 & 2131 & 4418 \\
6885 & 22253 & 571 & 1831 & 23281 & 74176 & 266 & 4529 \\
5381 & 23901 & 913 & 1903 & 217 & 76679 & 2418 & 4518 \\
20368 & 20449 & 371 & 2030 & 51072 & 79217 & 950 & 5009 \\
10745 & 25113 & 1457 & 1883 & 69793 & 70440 & 3618 & 4771 \\
17777 & 25104 & 1469 & 2024 & 12721 & 90136 & 4076 & 4627 \\ \hline
\end{tabular}
}
\caption{Primitive solutions to $a^3+b^3=c^4+d^4$, Part 1.}
\label{Ta:sol34a}
\end{table}

\begin{table}[!ht]
\centering
\resizebox{.65\columnwidth}{!}{%
\begin{tabular}{|r|r|r|r||r|r|r|r|} \hline
$a$ & $b$ & $c$ & $d$ & $a$ & $b$ & $c$ & $d$ \\ \hline
15248 & 91169 & 3207 & 5060 & 111875 & 133933 & 3606 & 7764 \\
77169 & 77912 & 3964 & 5117 & 120089 & 136087 & 5496 & 7602 \\
77393 & 77904 & 4633 & 4670 & 74384 & 157697 & 6811 & 6834 \\
15333 & 100205 & 1781 & 5623 & 77375 & 157633 & 6252 & 7308 \\
7849 & 101257 & 257 & 5677 & 104528 & 154625 & 1791 & 8336 \\
72753 & 103520 & 3809 & 5986 & 89673 & 161689 & 675 & 8387 \\
12269 & 116357 & 3021 & 6217 & 127992 & 143009 & 1757 & 8414 \\
70181 & 109325 & 3177 & 6275 & 85529 & 172402 & 2691 & 8688 \\
1129 & 118857 & 4087 & 6117 & 10320 & 183793 & 6732 & 8029 \\
45176 & 129521 & 1222 & 6897 & 145373 & 183379 & 570 & 9804 \\
109009 & 110017 & 1861 & 7151 & 64989 & 210277 & 2379 & 9883 \\
17717 & 138189 & 557 & 7171 & 18403 & 216605 & 4092 & 9972 \\
47233 & 137824 & 3388 & 7135 & 162754 & 180713 & 7365 & 9234 \\
25176 & 142801 & 197 & 7356 & 94201 & 215481 & 8459 & 8697 \\
41361 & 145361 & 407 & 7487 & & & & \\ \hline
\end{tabular}
}
\caption{Primitive solutions to $a^3+b^3=c^4+d^4$, Part 2.}
\label{Ta:sol34b}
\end{table}


Table \ref{Ta:sol35} shows the primitive solutions to
$0\le a^3+b^3=c^5+d^5=N$ with $0\le c\le d\le 5000$ in order by the size of $N$.
Note that $c=187$ occurs in both the second and third solutions.

{
\begin{table}[ht]
\begin{center}
\begin{tabular}{|r|r|r|r||r|r|r|r|} \hline
$a$ & $b$ & $c$ & $d$ & $a$ & $b$ & $c$ & $d$ \\ \hline
2467 & 3071 & 115 & 119 & 315515 & 410576 & 96 & 2515 \\
7755 & 15102 & 187 & 326 & 324657 & 450095 & 1458 & 2600 \\
14475 & 29190 & 187 & 488 & 111359 & 526113 & 1286 & 2700 \\
9301 & 40290 & 80 & 581 & 74484 & 597517 & 293 & 2924 \\
41144 & 144677 & 653 & 1244 & 480397 & 480926 & 1690 & 2909 \\
39032 & 150265 & 1065 & 1158 & 50387 & 710804 & 123 & 3244 \\
177898 & 451093 & 1765 & 2404 & 265936 & 1225217 & 3838 & 4001 \\ \hline
\end{tabular}
\caption{Primitive solutions to $a^3+b^3=c^5+d^5$.}
\label{Ta:sol35}
\end{center}
\end{table}
}

Table \ref{Ta:sol36} shows the primitive solutions to
$0\le a^3+b^3=c^6+d^6=N$ with $0\le c\le d\le 1400$ in order by the size of $N$.

{
\begin{table}[ht]
\begin{center}
\begin{tabular}{|r|r|r|r||r|r|r|r|} \hline
$a$ & $b$ & $c$ & $d$ & $a$ & $b$ & $c$ & $d$ \\ \hline
3441 & 7708 & 57 & 88 & 265008 & 500137 & 636 & 653 \\
28105 & 28596 & 40 & 189 & 85656 & 620785 & 534 & 775 \\
50145 & 350428 & 286 & 591 & 296305 & 1233132 & 238 & 1113 \\
225681 & 458812 & 233 & 690 & & & & \\ \hline
\end{tabular}
\caption{Primitive solutions to $a^3+b^3=c^6+d^6$.}
\label{Ta:sol36}
\end{center}
\end{table}
}

\section{The first heuristic argument}\label{heuristic}

We estimate the probability that $a^j+b^j=c^k+d^k$ has a nontrivial
solution using a form of the Birthday Paradox.
This argument is old and well known.
Weaver \cite{WW}, page 135, told an amusing anecdote about the 
Birthday Paradox during World War II.

Our first heuristic assumption is that the four terms 
$a^j$, $b^j$, $c^k$, $d^k$,
are random integers of about the same size $B$, say, between
$B/2$ and $3B/2$.
Then $a$ and $b$ will be near $B^{1/j}$ and there will be
about that many possible values for each of them, so that
there are about $B^{2/j}$ pairs $(a,b)$.
Likewise, there are about $B^{2/k}$ pairs $(c,d)$ with
$c$ and $d$ near $B^{1/k}$.

The sums $a^j+b^j$, $c^k+d^k$ will be random integers in the
interval $[B,2B]$ of length $B$, and we assume they are independent.
Then the probability that one particular sum $a^j+b^j$ differs
from every one of the $B^{2/k}$ sums $c^k+d^k$ is
$(1-1/B)^{B^{2/k}}$.
By independence, the probability that every sum $a^j+b^j$ differs
from every sum $c^k+d^k$ is
\[
((1-1/B)^{B^{2/k}})^{B^{2/j}}= (1-1/B)^{B^{2/j+2/k}},
\]
and the probability that the equation $a^j+b^j=c^k+d^k$ has at least
one solution with numbers of this size is $1$ minus this probability.

Since $B$ is large we may approximate $1-1/B$ by $\exp(-B^{-1})$.
The probability of at least one solution becomes $1-\exp(-B^{-1+2/j+2/k})$.
When $2/j+2/k<1$ the probability is near 0,
so we expect no solution.
When $2/j+2/k>1$ the probability is near 1,
so we expect many solutions.
When $2/j+2/k=1$ we have a borderline case
where there may be a few solutions or none at all.

This heuristic argument explains why there are many solutions
to $a^j+b^j=c^k+d^k$ when $j=2$: $2/j+2/k>1$ 
for every integer $k>1$.

When $j=3$ the argument predicts many solutions for $k=4$ and 5,
just a few solutions when $k=6$, and no solution when $k>6$.
It also predicts no solution for $3<j<k$.
This is just what we found.

The case $j=k=4$ is also a borderline case and it has
infinitely many solutions perhaps because there is a parametric solution.
Wroblewski \cite{Wro} found 11089 solutions with $a$, $b$, $c$,
$d\le10^{14}$.

Note that the comparison of number of solutions is a bit unfair
because of different search limits $M$.
Tables \ref{Ta:sol34a}, \ref{Ta:sol34b},
\ref{Ta:sol35}, and \ref{Ta:sol36}
give all solutions with roughly
the same limit on the sum $N$.

\section{The second heuristic argument}\label{anheur}

The argument in this section is modeled on that of
Erd{\H o}s and Ulam \cite{EU}.
We will show that for most sequences having the growth rates of
$(S_n^{(j)})_{n\ge1}$ and $(S_n^{(k)})_{n\ge1}$ there is a nontrivial
intersection if and only if $2/j+2/k\le1$.
This theorem proves nothing about particular sequences like
$(S_n^{(j)})_{n\ge1}$ or $(S_n^{(k)})_{n\ge1}$, but it suggests
that the same statement is likely to hold for them.

We define a probability measure on the space of sequences
of positive integers.  See Erd{\H o}s and R{\'e}nyi \cite{ER}
or Halberstam and Roth \cite{HR} for more about this measure.
Let $\gamma>1$ be a real number and $n$ be a positive integer.
Let the measure of the set of all
sequences containing $n$ be $c_1 n^{-1+1/\gamma}$
and the measure of the complement be $1-c_1 n^{-1+1/\gamma}$.
Here $c_1$ and other $c_i$ used later are appropriate positive constants.
In this case, $c_1$ is chosen so that the measure of the set
of all sequences is 1.
Call this measure the $\gamma$ measure.
The phrase ``almost all sequences $\Ac$'' will mean ``for all $\Ac$
except for a set of sequences of $\gamma$ measure 0.''
Let $P_{\gamma}(n)=c_1 n^{-1+1/\gamma}$ be the probability that $n\in\Ac$.

If $\Ac$ is a sequence of positive integers and $x$ is a real number,
let $A(x)$ be the number of $a\in\Ac$ with $a\le x$.
It is easy to see that $A(x)=(1+o(1))c_1\gamma x^{1/\gamma}$
for almost all $\Ac$.
Hence the $n$-th term of $\Ac$ is $(1+o(1))(n/c_1\gamma)^{\gamma}$
for almost all $\Ac$.

Let $2\Ac$ denote the sequence of all sums $a+a'$
with $a\in\Ac$ and $a'\in\Ac$.
Note that if $\gamma=j\ge2$, then, for almost all $\Ac$,
$\Ac$ and $2\Ac$ have growth
rates similar to those of $(n^j)_{n\ge1}$ and $(S_n^{(j)})_{n\ge1}$,
respectively.

Now let $1<\alpha\le\beta$.
Write $P_{\alpha}(n)=c_1 n^{-1+1/\alpha}$ and
$P_{\beta}(n)=c_2 n^{-1+1/\beta}$.

\begin{theorem}
Let $1<\alpha\le\beta$.
If $2/\alpha + 2/\beta < 1$, then for almost all sequences $\Ac$
in $\alpha$ measure and almost all sequences $\Bc$
in $\beta$ measure the intersection $2\Ac\cap2\Bc$ is finite.
But if $2/\alpha + 2/\beta \ge 1$, then for almost all sequences $\Ac$
in $\alpha$ measure and almost all sequences $\Bc$
in $\beta$ measure the intersection $2\Ac\cap2\Bc$ is infinite.
\end{theorem}

The proof is based on that in Erd{\H o}s and Ulam \cite{EU}.

\begin{proof}
We will prove the first statement by showing that the expected
number $E$ of integers $n$ in the intersection is finite.
We have
\begin{align}\nonumber
E & = \sum_{n=1}^{\infty}
\left(\sum_{u+v=n} P_{\alpha}(u)P_{\alpha}(v) \right)
\left(\sum_{u+v=n} P_{\beta}(u)P_{\beta}(v) \right) \\ \nonumber
& = \sum_{n=1}^{\infty}
c_1^2 c_2^2 \left(\sum_{u+v=n} (uv)^{-1+1/\alpha} \right)
\left(\sum_{u+v=n} (uv)^{-1+1/\beta} \right) \\ \nonumber
& < c_3 \sum_{n=1}^{\infty} n^{-1+2/\alpha} n^{-1+2/\beta}  \\ \nonumber
& = c_3 \sum_{n=1}^{\infty} n^{-2+2/\alpha+2/\beta} , \nonumber
\end{align}
where the inner sums were estimated by integrals.
For example, the first inner sum is estimated by
$\int_0^n (u(n-u))^{-1+1/\alpha}du=n^{-2+2/\alpha}nc_4=c_4n^{-1+2/\alpha}$.
Since $2/\alpha + 2/\beta < 1$, $E<\infty$ and the intersection
is finite by the Borel-Cantelli lemma.
See Feller \cite{Fell} for the Borel-Cantelli lemma.

Now suppose $2/\alpha + 2/\beta \ge 1$.
We will give the proof for the case $2/\alpha + 2/\beta = 1$.
The case $2/\alpha + 2/\beta > 1$ is similar.
Let $E(x)$ denote the expected number of integers $n\le x$ in the intersection.
We have
\begin{align}\nonumber
E(x) & = \sum_{n=1}^x
\left(\sum_{u+v=n} P_{\alpha}(u)P_{\alpha}(v) \right)
\left(\sum_{u+v=n} P_{\beta}(u)P_{\beta}(v) \right) \\ \nonumber
& = \sum_{n=1}^x
c_1^2 c_2^2 \left(\sum_{u+v=n} (uv)^{-1+1/\alpha} \right)
\left(\sum_{u+v=n} (uv)^{-1+1/\beta} \right) \\ \nonumber
& = (1+o(1)) c_5 \sum_{n=1}^x n^{-2+2/\alpha+2/\beta}   \\ \nonumber
& = (1+o(1)) c_5 \sum_{n=1}^x n^{-1} = (1+o(1)) c_5 \log x . \nonumber
\end{align}
Now we use a second moment argument to show that
for almost all $\Ac$ and almost all $\Bc$ the size $f(\Ac,\Bc,x)$
of $2\Ac\cap2\Bc\cap[1,x]$ satisfies
$f(\Ac,\Bc,x)=(1+o(1)) c_5 \log x $ so that
$\lim_{x\rightarrow\infty} f(\Ac,\Bc,x)/E(x) = 1$.
The expected value of $f(\Ac,\Bc,x)$ is $E(x)$, which we just
computed.
Let $E^2(x)$ be the expected value of $f(\Ac,\Bc,x)^2$.  Then
$E^2(x)=$
\[
\sum_{n_1=1}^x\sum_{n_2=1}^x
\sum_{u_1+v_1=n_1}
\sum_{u_2+v_2=n_1}
\sum_{u_3+v_3=n_2}
\sum_{u_4+v_4=n_2}
P(u_1,u_2,u_3,u_4,v_1,v_2,v_3,v_4),
\]
where $P(u_1,u_2,u_3,u_4,v_1,v_2,v_3,v_4)$ is the probability
that $u_1$, $v_1$, $u_2$, and $v_2$ are in $\Ac$ and 
that $u_3$, $v_3$, $u_4$, and $v_4$ are in $\Bc$.
If these eight integers were distinct, we would have
$P(u_1,u_2,u_3,u_4,v_1,v_2,v_3,v_4)=$
\[
P_{\alpha}(u_1)
P_{\alpha}(v_1)
P_{\alpha}(u_2)
P_{\alpha}(v_2)
P_{\beta}(u_3)
P_{\beta}(v_3)
P_{\beta}(u_4)
P_{\beta}(v_4),
\]
and the sum would be $(E(x))^2$,
but if some integers are repeated, the probability is larger.
Hence, $E^2(x)>(E(x))^2$.
To get the opposite inequality we add terms to $E^2(x)$
to account for possible repeated values.

If the eight integers were distinct, we could pair the sums
\[
\left(\sum_{u_1+v_1=n_1} P_{\alpha}(u_1)P_{\alpha}(v_1) \right)
\left(\sum_{u_3+v_3=n} P_{\beta}(u_3)P_{\beta}(v_3) \right) 
\]
and obtain $(1+o(1))c_6\log x$ as in the calculation for $E(x)$.
But if say, $u_3=u_1$, then $v_3=v_1$ and the two sums become
\begin{align}\nonumber
\sum_{u_1+v_1=n_1} P_{\alpha}(u_1)P_{\alpha}(v_1) 
 P_{\beta}(u_1)P_{\beta}(v_1)
= & \sum_{u_1+v_1=n_1} (u_1v_1)^{-1+1/\alpha} (u_1v_1)^{-1+1/\beta}  \\ \nonumber
= & \sum_{u_1+v_1=n_1} (u_1v_1)^{-2+1/\alpha+1/\beta} \\  \nonumber
= & \sum_{u_1+v_1=n_1} (u_1v_1)^{-3/2}. \nonumber
\end{align}
When we approximate this sum by the integral
$
\int_0^{n_1} (u_1(n_1-u_1))^{-3/2}du
$
we get a constant times $n_1^{-2}$, and the sum on $n_1$ is finite.
The sum on $n_2$ pairs the other two sums and gives
$(1+o(1))c_7\log x$.

Likewise, the other added terms are all less than constants times $\log x$.
Therefore, $(E(x))^2 < E^2(x) < (E(x))^2+c_8\log x$.
By the Tchebycheff inequality the $\alpha$ measure of the set of $\Ac$ and
the $\beta$ measure of the set of $\Bc$ for which 
\[
|f(\Ac,\Bc,x) - E(x)| > \epsilon\log x
\]
are less than $c_9/\epsilon^2\log x$.
Let $x_k=2^{k(\log k)^2}$.  By the Borel-Cantelli lemma
we have 
$$\lim_{k\rightarrow\infty} f(\Ac,\Bc,x_k)/E(x_k) = 1.$$
Therefore, 
since $f(\Ac,\Bc,x_k)\le f(\Ac,\Bc,x)\le f(\Ac,\Bc,x_{k+1})$
when $x_k < x < x_{k+1}$,
for almost all $\Ac$ and almost all $\Bc$ we have
$\lim_{x\rightarrow\infty} f(\Ac,\Bc,x)/E(x) = 1$.
In the same way, 
$\lim_{x\rightarrow\infty} f(\Ac,\Bc,x)/E(x) = 1$ when
$2/\alpha+2/\beta>1$.
Since $E(x)$ is unbounded as $x\rightarrow\infty$,
the intersection $2\Ac\cap2\Bc$ is infinite for
almost all $\Ac$ and almost all $\Bc$ when
$2/\alpha+2/\beta\ge1$.
\end{proof}

Now let $\alpha=j$ and $\beta=k$.
If $(n^j)_{n\ge1}$ and $(n^k)_{n\ge1}$ were typical sequences,
this theorem would predict infinitely many solutions
to $a^j+b^j=c^k+d^k$ when $2/j+2/k\ge1$ 
and finitely many solutions when $2/j+2/k<1$.
Of course, Lander \cite{Land} found infinitely many solutions
to this equation for all $j$ and $k$.
Thus $(n^j)_{n\ge1}$ and $(n^k)_{n\ge1}$ are special sequences
in the exceptional set of measure 0 when $2/j+2/k<1$.
But since the theorem predicts that there should be no solutions,
perhaps Lander found all solutions in this case.

\section{Acknowledgments}
I thank Bjorn Poonen for suggesting an improvement to
the first heuristic argument.
I thank the anonymous referee for suggestions and references
that improved the manuscript and speeded the program.

\begin{thebibliography}{99}

\bibitem{Ber00}
D.~J.~Bernstein,
Enumerating solutions to {$p(a)+q(b)=r(c)+s(d)$}.
{\em Math. Comp.} {\bf 70} (2000), 389--394.

\bibitem{Bro02}
T.~D.~Browning,
Equal sums of two $k$th powers.
{\em J. Number Theory} {\bf 96} (2002), 293--318.

\bibitem{Cho91}
A.~Choudhry,
The {D}iophantine equation {$A^4+B^4=C^4+D^4$}.
{\em Indian J. Pure Appl. Math.} {\bf 22} (1991), 9--11.

\bibitem{Eis}
P.~Eisermann,
Bimonotone enumeration.
{\em Math. Comp.} {\bf 78} (2009), 591--613.

\bibitem{ER}
P.~Erd{\H o}s and A.~R{\'e}nyi,
Additive properties of random sequences of positive integers.
{\em Acta Arith.} {\bf 6} (1960), 83--110.

\bibitem{EU}
P.~Erd{\H o}s and S.~Ulam,
Some probabilistic remarks on {F}ermat's last theorem.
{\em Rocky Mountain J. Math.} {\bf 1} (1971), 613--616.

\bibitem{Fell}
W.~Feller,
{\em An Introduction to Probability Theory
and Its Applications}, Vol.~1, 2nd edition.
Wiley, 1957.

\bibitem{Guy94}
R.~K.~Guy,
{\em Unsolved Problems in Number Theory}.
Springer, 2nd edition, 1994.

\bibitem{HR}
H.~Halberstam and K.~F.~Roth,
{\em Sequences}, Vol.~1.
Oxford, 1966.

\bibitem{HW60}
G.~H.~Hardy and E.~M.~Wright,
{\em An Introduction to the Theory of Numbers}.
4th edition, Oxford, 1960.

\bibitem{Land}
L.~J.~Lander,
Equal sums of unlike powers.
{\em Fibonacci Quart.} {\bf 28} (1990), 141--150.

\bibitem{OEIS}
OEIS Foundation Inc.,
The On-Line Encyclopedia of Integer Sequences, 2022.
Available at \url{https://oeis.org}.

\bibitem{WW}
W.~Weaver,
{\em Lady Luck, the Theory of Probability}.
Anchor Books, 1963.

\bibitem{Wro}
J.~Wroblewski, 2006.
Available at 
\url{http://www.math.uni.wroc.pl/~jwr/422/422.zip}.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent
2020 \emph{Mathematics Subject Classification}:~Primary 11D41.
Secondary 11Y50. 

\noindent
\emph{Keywords}:~equal sums like powers.

\bigskip
\hrule
\bigskip

\noindent
(Concerned with sequences
\seqnum{A003336},
\seqnum{A003347},
\seqnum{A003358}, and
\seqnum{A004999}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received January 8 2022;
revised version received February 24 2022; March 6 2022.  
Published in {\it Journal of Integer Sequences}, March 6 2022.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                

