Is $1072$ the sum of $51$ cubes?

182 Views Asked by At

Inspired by this superb question

Number writable as sum of cubes in $9$ "consecutive" ways

I wonder, whether $1072$, being the sum of $2,3,4,...,50$ cubes, is also a sum of $51$ cubes. Of course, $0$ is not allowed. I did not find a representation yet, but there might be still one.

If the answer is yes :

What is the smallest number $k>1$, such that $1072$ is NOT the sum of $k$ cubes ?

2

There are 2 best solutions below

1
On

I computed this in two parts: first, up to some 14 cubes larger than one; we get everything up to 922 this way, and some after. The most difficult is 860. We list only the cubes larger than one. Finding that everything up to 922 was covered, I then did a separate short program, just cubes of 5,4,3,2, with no bound on number of such cubes, because 1072 - 923 = 149. Nothing new came up. So, the missing numbers are 1, because 1072 is not a cube, but then another 75 beginning with 923.

================================

  923  930  937  944  949  951  956  958  963  965
  970  972  975  977  979  982  984  986  989  991
  993  996  998 1000 1001 1003 1005 1007 1008 1010
 1012 1014 1015 1017 1019 1021 1022 1024 1026 1027
 1028 1029 1031 1033 1034 1035 1036 1038 1040 1041
 1042 1043 1045 1047 1048 1049 1050 1052 1053 1054
 1055 1056 1057 1059 1060 1061 1062 1063 1064 1066
 1067 1068 1069 1070 1071

missing  size 75

================================

   50   8   8
   51   9   6   3   3   3
   52  10   2   2   2
   53   8   6   6   3   3   3
   54   8   6   6   4   2   2
   55   6   6   6   5   5   5
   56   9   5   5   3   2   2
   57   6   6   5   5   5   5   4   3
   58   7   7   6   4   3   3
   59  10   2   2
   60   8   7   4   4   3   2

=================================

  860   3   3   3   3   3   3   2   2   2   2   2   2   2   2
  861   4   4   3   3   3   2
  862   4   4   4   2   2   2
  863   5   3   3   3   2
  864   5   4   2   2   2
  865   4   3   3   3   3   3   2   2
  866   4   4   3   3   2   2   2   2
  867   3   3   3   3   3   3   2   2   2   2   2   2   2
  868   4   4   3   3   3
  869   4   4   4   2   2
  870   5   3   3   3
  871   5   4   2   2
  872   4   3   3   3   3   3   2
  873   4   4   3   3   2   2   2
  874   3   3   3   3   3   3   2   2   2   2   2   2
  875   5   3   3   2   2   2
  876   4   4   4   2
  877   4   3   3   3   3   2   2   2   2
  878   5   4   2
  879   4   3   3   3   3   3
  880   4   4   3   3   2   2
  881   3   3   3   3   3   3   2   2   2   2   2
  882   5   3   3   2   2
  883   4   4   4
  884   4   3   3   3   3   2   2   2
  885   5   4
  886   3   3   3   3   3   2   2   2   2   2   2   2   2
  887   4   4   3   3   2
  888   3   3   3   3   3   3   2   2   2   2
  889   5   3   3   2
  890   3   3   3   3   3   3   3
  891   4   3   3   3   3   2   2
  892   4   4   3   2   2   2   2
  893   3   3   3   3   3   2   2   2   2   2   2   2
  894   4   4   3   3
  895   3   3   3   3   3   3   2   2   2
  896   5   3   3
  897   4   4   2   2   2   2   2   2   2
  898   4   3   3   3   3   2
  899   4   4   3   2   2   2
  900   3   3   3   3   3   2   2   2   2   2   2
  901   5   3   2   2   2
  902   3   3   3   3   3   3   2   2
  903   4   3   3   3   2   2   2   2
  904   4   4   2   2   2   2   2   2
  905   4   3   3   3   3
  906   4   4   3   2   2
  907   3   3   3   3   3   2   2   2   2   2
  908   5   3   2   2
  909   3   3   3   3   3   3   2
  910   4   3   3   3   2   2   2
  911   4   4   2   2   2   2   2
  912   3   3   3   3   2   2   2   2   2   2   2   2
  913   4   4   3   2
  914   3   3   3   3   3   2   2   2   2
  915   5   3   2
  916   3   3   3   3   3   3
  917   4   3   3   3   2   2
  918   4   4   2   2   2   2
  919   3   3   3   3   2   2   2   2   2   2   2
  920   4   4   3
  921   3   3   3   3   3   2   2   2
  922   5   3
  924   4   3   3   3   2
  925   4   4   2   2   2
  926   3   3   3   3   2   2   2   2   2   2
  927   5   2   2   2
  928   3   3   3   3   3   2   2
  929   4   3   3   2   2   2   2
  931   4   3   3   3
  932   4   4   2   2
  933   3   3   3   3   2   2   2   2   2
  934   5   2   2
  935   3   3   3   3   3   2
  936   4   3   3   2   2   2
  938   3   3   3   2   2   2   2   2   2   2   2
  939   4   4   2
  940   3   3   3   3   2   2   2   2
  941   5   2
  942   3   3   3   3   3
  943   4   3   3   2   2
  945   3   3   3   2   2   2   2   2   2   2
  946   4   4
  947   3   3   3   3   2   2   2
  948   5
  950   4   3   3   2
  952   3   3   3   2   2   2   2   2   2
  953   4   2   2   2   2   2   2   2   2
  954   3   3   3   3   2   2
  955   4   3   2   2   2   2
  957   4   3   3
  959   3   3   3   2   2   2   2   2
  960   4   2   2   2   2   2   2   2
  961   3   3   3   3   2
  962   4   3   2   2   2
  964   3   3   2   2   2   2   2   2   2   2
  966   3   3   3   2   2   2   2
  967   4   2   2   2   2   2   2
  968   3   3   3   3
  969   4   3   2   2
  971   3   3   2   2   2   2   2   2   2
  973   3   3   3   2   2   2
  974   4   2   2   2   2   2
  976   4   3   2
  978   3   3   2   2   2   2   2   2
  980   3   3   3   2   2
  981   4   2   2   2   2
  983   4   3
  985   3   3   2   2   2   2   2
  987   3   3   3   2
  988   4   2   2   2
  990   3   2   2   2   2   2   2   2   2
  992   3   3   2   2   2   2
  994   3   3   3
  995   4   2   2
  997   3   2   2   2   2   2   2   2
  999   3   3   2   2   2
 1002   4   2
 1004   3   2   2   2   2   2   2
 1006   3   3   2   2
 1009   4
 1011   3   2   2   2   2   2
 1013   3   3   2
 1016   2   2   2   2   2   2   2   2
 1018   3   2   2   2   2
 1020   3   3
 1023   2   2   2   2   2   2   2
 1025   3   2   2   2
 1030   2   2   2   2   2   2
 1032   3   2   2
 1037   2   2   2   2   2
 1039   3   2
 1044   2   2   2   2
 1046   3
 1051   2   2   2
 1058   2   2
 1065   2

================================

fragments from the program, C++

int main()
{

 int target = 1072;

 set<int>::iterator iter;

  set<int> missing ;
  for( int s = 2; s <= target - 1; ++s) missing.insert(s);


for(int x1 = 2; cube(x1) <= target; ++x1)
{
  int sofar1 = cube(x1);
  int how_many = 1 + target - sofar1;
  if (missing.count(how_many) )  cout << setw(5) << how_many << setw(4) << x1 << endl;
  missing.erase(how_many);
} // x1

cout << endl << endl;

for(int x1 = 2; cube(x1) <= target; ++x1)
{
  int sofar1 = cube(x1);
  for(int x2 = 2; x2 <= x1 && sofar1 + cube(x2) <= target; ++x2)
  {
    int sofar2 = sofar1 + cube(x2);
    int how_many = 2 + target - sofar2;
    if (missing.count(how_many) )    cout << setw(5) << how_many  << setw(4) << x1 << setw(4) << x2 << endl;
    missing.erase(how_many);
  } // x2
} // x1
cout << endl << endl;

for(int x1 = 2; cube(x1) <= target; ++x1)
{
  int sofar1 = cube(x1);
  for(int x2 = 2; x2 <= x1 && sofar1 + cube(x2) <= target; ++x2)
  {
    int sofar2 = sofar1 + cube(x2);
    for(int x3 = 2; x3 <= x2 && sofar2 + cube(x3) <= target; ++x3)
    {
      int sofar3 = sofar2 + cube(x3);
      int how_many = 3 + target - sofar3;
      if (missing.count(how_many) )   cout << setw(5) << how_many  << setw(4) << x1 << setw(4) << x2 << setw(4) << x3 << endl;
      missing.erase(how_many);
    } // x3
  } // x2
} // x1
cout << endl << endl;

//...... same up to loop for x15 which gave no more than x14, then:

for( int e5 = 0; e5 <= 1; ++e5)
{
  int sofar5 = 125 * e5;
  for(int e4 = 0; sofar5 + 64 * e4 <= 149; ++e4)
  {
    int sofar4 =  sofar5 + 64 * e4;
    for(int e3 = 0; sofar4 + 27 * e3 <= 149; ++e3)
    {
      int sofar3 =  sofar4 + 27 * e3;
      for(int e2 = 0; sofar3 + 8 * e2 <= 149; ++e2)
      {
        int sofar2 =   sofar3 + 8 * e2;
        int how_many = e5 + e4 + e3 + e2 + target - sofar2;
         if (missing.count(how_many) )   cout << how_many <<  "      5 : " << e5   <<  "      4 : " << e4  <<  "      3 : " << e3  <<  "      2 : " << e2 << endl; 
        missing.erase(how_many);
      } // 2
    } // 3
  }
}

===============================

3
On

51 cubes summing to 1072.
1+1+1...+1+27+27+27+216+729 = 1072