is 1001 the only sum of two positive cubes that is the product of three consecutive odd primes?
That is $\ 10^3+1^3=7.11.13$.
I could find no other examples. So I am looking to see if there are any more solutions to $ x^3+y^3=p.q.r$, where $ x, y$ are positive integers and $ p<q<r$ are consecutive odd primes. Now $ x^3 + y^3 =LQ$ where $ L=x+y$, and $ Q = L^2 -3xy$.
After playing with the problem for a while I thought maybe I should try and express the triple of factors in terms of the gaps between them. So $ g_1 = q-p$, and $ g_2=r-q$, and I was thinking what was the biggest possible factor that divided the resulting sum of cubes after choosing the gaps.
Using elementary arguments I found that, $ L=q$, or $ L=r$ , so dealing with the later case put $ L=r$, and $ Q=pq= L^2 -3xy$, eliminate $p$, and $q$, and put $ x = (L+d)/2$, $ y=(L-d)/2$ for $d$ an odd positive integer. Giving $ L^2 - (g_1+2g_2)L+g_1(g_1+g_2)=L^2-3(L^2-d^2)/4$. Completing the square and simplifying gives $ z^2-9d^2 = 4f$, where $ z= 3L-2(g_1+2g_2)$, and $ f = g_1^2+g_1g_2+g_2^2$, the gaps are even so suitable factors can always be found, that is $a$, $b$, such that $4f= ab$, and we get using the difference of squares $z= (a+b)/2$, and so $L=\frac{z+2(g_1+2g_2)}{3}$. Now the largest $z$ is $f+1$, and so the largest,
$$L=\frac{g_1^2+g_1g_2+g_2^2+1+2g_1+4g_2}{3}$$ and chosing $g$ to be the bigger of the two gaps gives a largest $L=\frac{3g^2+6g+1}{3}<(g+1)^2$
so for both cases the largest possible "prime" factor in any triple of solutions was bounded above by roughly the square of the largest gap. Looking at Wikipedia prime gaps then Dr T Nicely's site on first occurrence of prime gaps https://faculty.lynchburg.edu/~nicely/gaps/gaplist.html I noticed that apart from a number of small cases that the primes where gaps first occurred where larger than $(g+1)^2$ suggesting that 1001 is the only case for the range of known first occurrences of prime gaps. I also saw somewhere but cannot remember at the moment something called Shank's conjecture, which is something like the first occurrence of a gap is after a prime that is about $e^\sqrt g$, which is obviously for large enough gap much bigger than $(g+1)^2$. See section 7 Marek Wolf 'Some heuristics on the gaps between consecutive primes' https://arxiv.org/pdf/1102.0481v2.pdf.
So this is roughly where I have got with the problem. I suspect I have missed a simpler solution?
35 is the only sum of two cubes equal to the product of two consecutive odd primes, using the notation above, let $ x^3 +y^3 = pq $, and $ 8<p<q$ be consecutive odd primes then $ L< Q = L^2 -3xy $, Put $ p=L$, $ q=Q$ and $ x=(L+d)/4$, $ y = (L-d)/4$, then $ (p^2+3d^2)/4=q$, so $ (p^2+3)/4 \le q$ but for $p> 8$, $ q>2p$, which contradicts Bertrand's Postulate whereby if we have consecutive primes then $ p< q<2p$ https://en.wikipedia.org/wiki/Bertrand's_postulate
You mention prime gaps and prime races; this addresses both. For prime $p \geq 11,$ with next prime $p + g,$ as far as we have been able to compute we find $$ g < \log^2 p $$ with logarithm base $e \approx 2.71828$
https://en.wikipedia.org/wiki/Cram%C3%A9r%27s_conjecture
I took consecutive primes $p \equiv q \equiv 1 \pmod 6,$ allowing for possible primes in between that are $6n-1.$ Then I produced the representations of $p$ and of $q$ as $u^2 - uv+ v^2,$ combining those by Gauss composition into $$ pq = x^2 - xy + y^2 $$ Then $(x+y) pq = x^3 + y^3$ is what you were requesting. I printed out when $$ p - 4 \log^2 q < x+y < q + 4 \log^2 q $$ If we call $o$ the prime just before $p,$ and $r$ the prime just after $q,$ I printed the word Interesting when $$ o \leq x+y \leq r $$ I paid no attention to factoring $x+y.$ Sometimes it is prime. Anyway, the printout dies out when $q > 46000.$
It has just reached Mon Oct 26 15:17:47 PDT 2020 progress 5580013. or 5 million and change.
Let me put just the good bits. The last INTERESTING line is
109*127 x 121 y 7 next 131 x+y 128 middle 1 INTERESTING Note $128 < 131$
Mon Oct 26 15:02:31 PDT 2020
Mon Oct 26 15:02:31 PDT 2020
progress 13
7*13 x 6 y -5 x+y 1 previous 5 middle 1
7*13 x 9 y -1 x+y 8 between INTERESTING
7*13 x 10 y 1 x+y 11 between INTERESTING
7*13 x 10 y 9 next 17 x+y 19 middle 1
7*13 x 11 y 5 next 17 x+y 16 middle 1 INTERESTING
7*13 x 11 y 6 next 17 x+y 17 middle 1 INTERESTING
13*19 x 11 y -7 x+y 4 previous 11 middle 1
13*19 x 14 y -3 x+y 11 previous 11 middle 1 INTERESTING
13*19 x 17 y 3 next 23 x+y 20 middle 1 INTERESTING
13*19 x 17 y 14 next 23 x+y 31 middle 1
13*19 x 18 y 7 next 23 x+y 25 middle 1
13*19 x 18 y 11 next 23 x+y 29 middle 1
31*37 x 22 y -17 x+y 5 previous 29 middle 0
31*37 x 27 y -11 x+y 16 previous 29 middle 0
31*37 x 38 y 11 next 41 x+y 49 middle 0
31*37 x 38 y 27 next 41 x+y 65 middle 0
31*37 x 39 y 17 next 41 x+y 56 middle 0
31*37 x 39 y 22 next 41 x+y 61 middle 0
37*43 x 25 y -21 x+y 4 previous 31 middle 1
37*43 x 31 y -14 x+y 17 previous 31 middle 1
37*43 x 45 y 14 next 47 x+y 59 middle 1
37*43 x 45 y 31 next 47 x+y 76 middle 1
37*43 x 46 y 21 next 47 x+y 67 middle 1
37*43 x 46 y 25 next 47 x+y 71 middle 1
61*67 x 46 y -27 x+y 19 previous 59 middle 0
61*67 x 53 y -18 x+y 35 previous 59 middle 0
61*67 x 71 y 18 next 71 x+y 89 middle 0
61*67 x 73 y 27 next 71 x+y 100 middle 0
61*67 x 73 y 46 next 71 x+y 119 middle 0
67*73 x 54 y -25 x+y 29 previous 61 middle 1
67*73 x 65 y -9 x+y 56 previous 61 middle 1
67*73 x 74 y 9 next 79 x+y 83 middle 1
67*73 x 79 y 25 next 79 x+y 104 middle 1
73*79 x 53 y -34 x+y 19 previous 71 middle 0
73*79 x 66 y -17 x+y 49 previous 71 middle 0
73*79 x 83 y 17 next 83 x+y 100 middle 0
73*79 x 87 y 34 next 83 x+y 121 middle 0
79*97 x 86 y -3 x+y 83 between INTERESTING
79*97 x 89 y 3 x+y 92 between INTERESTING
97*103 x 94 y -11 x+y 83 previous 89 middle 1
97*103 x 105 y 11 next 107 x+y 116 middle 1
97*103 x 115 y 49 next 107 x+y 164 middle 1
103*109 x 87 y -31 x+y 56 previous 101 middle 1
103*109 x 118 y 31 next 113 x+y 149 middle 1
103*109 x 122 y 53 next 113 x+y 175 middle 1
109*127 x 107 y -19 x+y 88 previous 107 middle 1
109*127 x 114 y -7 x+y 107 previous 107 middle 1 INTERESTING
109*127 x 121 y 7 next 131 x+y 128 middle 1 INTERESTING
109*127 x 126 y 19 next 131 x+y 145 middle 1
139*151 x 132 y -23 x+y 109 previous 137 middle 1
139*151 x 155 y 23 next 157 x+y 178 middle 1
151*157 x 173 y 51 next 163 x+y 224 middle 0
157*163 x 129 y -50 x+y 79 previous 151 middle 0
157*163 x 146 y -25 x+y 121 previous 151 middle 0
157*163 x 171 y 25 next 167 x+y 196 middle 0
157*163 x 179 y 50 next 167 x+y 229 middle 0
181*193 x 163 y -41 x+y 122 previous 179 middle 1
181*193 x 204 y 41 next 197 x+y 245 middle 1
199*211 x 180 y -43 x+y 137 previous 197 middle 0
199*211 x 197 y -15 x+y 182 previous 197 middle 0
199*211 x 212 y 15 next 223 x+y 227 middle 0
199*211 x 223 y 43 next 223 x+y 266 middle 0
223*229 x 217 y -17 x+y 200 previous 211 middle 1
223*229 x 234 y 17 next 233 x+y 251 middle 1
271*277 x 241 y -57 x+y 184 previous 269 middle 0
271*277 x 253 y -38 x+y 215 previous 269 middle 0
271*277 x 291 y 38 next 281 x+y 329 middle 0
271*277 x 298 y 57 next 281 x+y 355 middle 0
277*283 x 270 y -19 x+y 251 previous 271 middle 1
277*283 x 289 y 19 next 293 x+y 308 middle 1
307*313 x 291 y -35 x+y 256 previous 293 middle 1
307*313 x 326 y 35 next 317 x+y 361 middle 1
307*313 x 339 y 70 next 317 x+y 409 middle 1
331*337 x 298 y -63 x+y 235 previous 317 middle 0
331*337 x 311 y -42 x+y 269 previous 317 middle 0
331*337 x 353 y 42 next 347 x+y 395 middle 0
331*337 x 361 y 63 next 347 x+y 424 middle 0
373*379 x 343 y -59 x+y 284 previous 367 middle 0
373*379 x 402 y 59 next 383 x+y 461 middle 0
397*409 x 364 y -69 x+y 295 previous 389 middle 1
397*409 x 433 y 69 next 419 x+y 502 middle 1
571*577 x 534 y -73 x+y 461 previous 569 middle 0
571*577 x 607 y 73 next 587 x+y 680 middle 0
601*607 x 578 y -49 x+y 529 previous 599 middle 0
601*607 x 627 y 49 next 613 x+y 676 middle 0
631*643 x 676 y 87 next 647 x+y 763 middle 1
661*673 x 652 y -29 x+y 623 previous 659 middle 0
661*673 x 681 y 29 next 677 x+y 710 middle 0
727*733 x 714 y -31 x+y 683 previous 719 middle 0
727*733 x 745 y 31 next 739 x+y 776 middle 0
739*751 x 700 y -83 x+y 617 previous 733 middle 1
739*751 x 783 y 83 next 757 x+y 866 middle 1
823*829 x 809 y -33 x+y 776 previous 821 middle 1
823*829 x 842 y 33 next 839 x+y 875 middle 1
1033*1039 x 1017 y -37 x+y 980 previous 1031 middle 0
1033*1039 x 1054 y 37 next 1049 x+y 1091 middle 0
1051*1063 x 1004 y -99 x+y 905 previous 1049 middle 1
1051*1063 x 1103 y 99 next 1069 x+y 1202 middle 1
1123*1129 x 1091 y -67 x+y 1024 previous 1117 middle 0
1123*1129 x 1158 y 67 next 1151 x+y 1225 middle 0
1153*1171 x 1121 y -78 x+y 1043 previous 1151 middle 1
1153*1171 x 1199 y 78 next 1181 x+y 1277 middle 1
1483*1489 x 1446 y -77 x+y 1369 previous 1481 middle 1
1483*1489 x 1523 y 77 next 1493 x+y 1600 middle 1
1567*1579 x 1532 y -79 x+y 1453 previous 1559 middle 1
1567*1579 x 1611 y 79 next 1583 x+y 1690 middle 1
1579*1597 x 1547 y -79 x+y 1468 previous 1571 middle 1
1579*1597 x 1626 y 79 next 1601 x+y 1705 middle 1
1657*1663 x 1611 y -94 x+y 1517 previous 1637 middle 0
1657*1663 x 1705 y 94 next 1667 x+y 1799 middle 0
1663*1669 x 1642 y -47 x+y 1595 previous 1657 middle 1
1663*1669 x 1689 y 47 next 1693 x+y 1736 middle 1
2551*2557 x 2502 y -101 x+y 2401 previous 2549 middle 0
2551*2557 x 2603 y 101 next 2579 x+y 2704 middle 0
2659*2671 x 2612 y -103 x+y 2509 previous 2657 middle 1
2659*2671 x 2715 y 103 next 2677 x+y 2818 middle 1
2791*2797 x 2731 y -122 x+y 2609 previous 2789 middle 0
2791*2797 x 2853 y 122 next 2801 x+y 2975 middle 0
2797*2803 x 2769 y -61 x+y 2708 previous 2791 middle 1
2797*2803 x 2830 y 61 next 2819 x+y 2891 middle 1
3229*3253 x 3183 y -113 x+y 3070 previous 3221 middle 1
3229*3253 x 3296 y 113 next 3257 x+y 3409 middle 1
3307*3313 x 3251 y -115 x+y 3136 previous 3301 middle 0
3307*3313 x 3366 y 115 next 3319 x+y 3481 middle 0
3541*3547 x 3483 y -119 x+y 3364 previous 3539 middle 0
3541*3547 x 3602 y 119 next 3557 x+y 3721 middle 0
3547*3559 x 3492 y -119 x+y 3373 previous 3541 middle 1
3547*3559 x 3611 y 119 next 3571 x+y 3730 middle 1
3943*3967 x 3891 y -125 x+y 3766 previous 3931 middle 1
3943*3967 x 4016 y 125 next 3989 x+y 4141 middle 1
5113*5119 x 5043 y -143 x+y 4900 previous 5107 middle 0
5113*5119 x 5186 y 143 next 5147 x+y 5329 middle 0
5197*5209 x 5161 y -83 x+y 5078 previous 5189 middle 0
5197*5209 x 5244 y 83 next 5227 x+y 5327 middle 0
5683*5689 x 5642 y -87 x+y 5555 previous 5669 middle 0
5683*5689 x 5729 y 87 next 5693 x+y 5816 middle 0
7723*7741 x 7681 y -101 x+y 7580 previous 7717 middle 1
7723*7741 x 7782 y 101 next 7753 x+y 7883 middle 1
10987*10993 x 10929 y -121 x+y 10808 previous 10979 middle 0
10987*10993 x 11050 y 121 next 11003 x+y 11171 middle 0
13297*13309 x 13236 y -133 x+y 13103 previous 13291 middle 0
13297*13309 x 13369 y 133 next 13313 x+y 13502 middle 0
18049*18061 x 17977 y -155 x+y 17822 previous 18047 middle 1
18049*18061 x 18132 y 155 next 18077 x+y 18287 middle 1
20947*20959 x 20869 y -167 x+y 20702 previous 20939 middle 0
20947*20959 x 21036 y 167 next 20963 x+y 21203 middle 0
21937*21943 x 21854 y -171 x+y 21683 previous 21929 middle 0
21937*21943 x 22025 y 171 next 21961 x+y 22196 middle 0
26821*26833 x 26732 y -189 x+y 26543 previous 26813 middle 0
26821*26833 x 26921 y 189 next 26839 x+y 27110 middle 0
26863*26881 x 26777 y -189 x+y 26588 previous 26861 middle 1
26863*26881 x 26966 y 189 next 26891 x+y 27155 middle 1
30307*30313 x 30209 y -201 x+y 30008 previous 30293 middle 0
30307*30313 x 30410 y 201 next 30319 x+y 30611 middle 0
30937*30949 x 30841 y -203 x+y 30638 previous 30931 middle 1
30937*30949 x 31044 y 203 next 30971 x+y 31247 middle 1
34033*34039 x 33929 y -213 x+y 33716 previous 34031 middle 0
34033*34039 x 34142 y 213 next 34057 x+y 34355 middle 0
35977*35983 x 35870 y -219 x+y 35651 previous 35969 middle 0
35977*35983 x 36089 y 219 next 35993 x+y 36308 middle 0
36637*36643 x 36529 y -221 x+y 36308 previous 36629 middle 0
36637*36643 x 36750 y 221 next 36653 x+y 36971 middle 0
45439*45481 x 45337 y -245 x+y 45092 previous 45433 middle 0
45439*45481 x 45582 y 245 next 45491 x+y 45827 middle 0
Mon Oct 26 15:02:35 PDT 2020
progress 60013
Mon Oct 26 15:02:38 PDT 2020
progress 120013
Mon Oct 26 15:02:43 PDT 2020
progress 180013
Mon Oct 26 15:02:47 PDT 2020
progress 240013
Mon Oct 26 15:02:54 PDT 2020
progress 300013
Mon Oct 26 15:02:58 PDT 2020
progress 360013
this is the C++ program in its current state. Uses GMP and my own collection of useful classes
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <strstream>
#include <list>
#include <set>
#include <math.h>
#include <iomanip>
#include <string>
#include <algorithm>
#include <iterator>
#include <gmp.h>
#include <gmpxx.h>
#include "form.h"
using namespace std;
// g++ -o two_cubes two_cubes.cc -lgmp -lgmpxx
// g++ -o two_cubes two_cubes.cc -lgmp -lgmpxx
int main()
{
cout << endl;
system("date");
cout << endl;
mpz_class oldp = 7;
mpz_class p = 7;
set<mp_pair> oldpairs;
set<mp_pair> pairs;
set<mp_pair> compositepairs;
for(mpz_class x = 1; 3 * x * x <= 4* p; ++x)
{
if( mp_SquareQ( 4*p - 3 * x * x ) )
{
mpz_class w = mp_Sqrt( 4*p - 3 * x * x );
mpz_class y = ( x + w) / 2 ;
mp_pair xy;
xy.setFields(x,y); oldpairs.insert(xy);
xy.SetNegative(); oldpairs.insert(xy);
xy.setFields(y,x); oldpairs.insert(xy);
xy.SetNegative(); oldpairs.insert(xy);
y = ( x - w) / 2 ;
xy.setFields(x,y); oldpairs.insert(xy);
xy.SetNegative(); oldpairs.insert(xy);
xy.setFields(y,x); oldpairs.insert(xy);
xy.SetNegative(); oldpairs.insert(xy);
}// if square
} // for x
mpz_class bound = 100000;
bound *= bound;
for( p = 13; p <= bound; p += 6)
{
if( p % 9000 == 13 ) cerr << " progress " << p << endl;
if( p % 60000 == 13 ) { system("date") ; cout << " progress " << p << endl << endl; }
if( mp_PrimeQ(p) )
{
// cout << endl;
// cout << p * oldp << " " ;
mpz_class middle = 0;
for(mpz_class u = oldp + 1; u < p; ++u)
{
if( mp_PrimeQ(u) ) ++middle;
}
// cout << " fax " << Factored(p * oldp) << endl;
double ll = mp_Log(p);
ll *= ll;
int l2 = (int) ceil(ll) ;
// cout << p << " ceil " << l2 << endl;
int boo = 1;
boo = boo & middle < 2;
pairs.clear();
for(mpz_class x = 1; 3 * x * x <= 4* p; ++x)
{
if( mp_SquareQ( 4*p - 3 * x * x ) )
{
mpz_class w = mp_Sqrt( 4*p - 3 * x * x );
mpz_class y = ( x + w) / 2 ;
mp_pair xy;
xy.setFields(x,y); pairs.insert(xy);
xy.SetNegative(); pairs.insert(xy);
xy.setFields(y,x); pairs.insert(xy);
xy.SetNegative(); pairs.insert(xy);
y = ( x - w) / 2 ;
xy.setFields(x,y); pairs.insert(xy);
xy.SetNegative(); pairs.insert(xy);
xy.setFields(y,x); pairs.insert(xy);
xy.SetNegative(); pairs.insert(xy);
}// if square
} // for x
compositepairs.clear();
set<mp_pair>::iterator iter1,iter2, iter;
for(iter1 = oldpairs.begin(); iter1 != oldpairs.end(); ++iter1) {
for(iter2 = pairs.begin(); iter2 != pairs.end(); ++iter2) {
mp_pair oldpair = *iter1;
mp_pair currentpair = *iter2;
mpz_class x = oldpair.GetX();
mpz_class y = oldpair.GetY();
mpz_class z = currentpair.GetX();
mpz_class w = currentpair.GetY();
mp_pair newpair( x*z - y*w, x*w + y*z - y*w );
compositepairs.insert( newpair);
}} // iter1 iter2
for(iter = compositepairs.begin(); iter != compositepairs.end(); ++iter) {
mp_pair newpair = *iter;
if( newpair.GetX() > 0 && newpair.GetX() + newpair.GetY() > 0 && newpair.GetX() > newpair.GetY() ){
// cerr << oldp << " " << p << " " << newpair.GetX() << " " << newpair.GetY() << endl;
mpz_class x = newpair.GetX();
mpz_class y = newpair.GetY();
if( (x+y >= oldp - 3 * l2) &&(x+y <= p + 3 * l2)) // mp_PrimeQ(x+y) &&
{
mpz_class t;
mpz_class previous;
mpz_class next;
if( x+y <= oldp && boo )
{
t = oldp - 2 ;
while( !mp_PrimeQ(t) ) --t;
previous = t;
cout << oldp << "*" << p << " x " << x << " y " << y << " x+y " << x+y << " previous " << previous << " middle " << middle ;
if(x+y >= previous ) cout << " INTERESTING " ;
cout << endl;
} // if less
else if( x+y >= p && boo )
{
t = p + 2 ;
while( !mp_PrimeQ(t) ) ++t;
next = t;
cout << oldp << "*" << p << " x " << x << " y " << y << " next " << next << " x+y " << x+y << " middle " << middle ;
if(x+y <= next ) cout << " INTERESTING " ;
cout << endl;
} // if more
else if( oldp < x + y && x+y < p) cout << oldp << "*" << p << " x " << x << " y " << y << " x+y " << x+y << " between INTERESTING " << endl;
} // between logs
} // if newpair
} // for composite
oldp = p;
oldpairs.clear();
for(iter = pairs.begin(); iter != pairs.end(); ++iter) {
mp_pair oldpair = *iter;
oldpairs.insert( oldpair);
} // for iter
} // if p prime
} // for p
cout << endl << endl;
system("date");
return 0;
}
// g++ -o two_cubes two_cubes.cc -lgmp -lgmpxx