2. How to search the solutions of n=x3+y3+2z3

Case n=6m

In this case, there exists the parametrized solution.

(x+1)3 + (x-1)3 = 2x3 + 6x

So

6x = (x+1)3 + (x-1)3 - 2x3

nxyz
602-1
1213-2
1824-3
2435-4
3046-5
............

Simple search method

It is generally assumed 0 ≤ |x| ≤ |y| ≤ |z|.
Signs of x, y, z and coefficient 2 are following 24 cases,

(1) x, y, 2z
(2) -x, y, 2z
(3) x, -y, 2z
(4) -x, -y, 2z
(5) x, y, -2z
(6) -x, y, -2z
(7) x, -y, -2z
(8) -x, -y, -2z

(9) x, 2y, z
(10) -x, 2y, z
(11) x, -2y, z
(12) -x, -2y, z
(13) x, 2y, -z
(14) -x, 2y, -z
(15) x, -2y, -z
(16) -x, -2y, -z

(17) 2x, y, z
(18) -2x, y, z
(19) 2x, -y, z
(20) -2x, -y, z
(21) 2x, y, -z
(22) -2x, y, -z
(23) 2x, -y, -z
(24) -2x, -y, -z

(lexical order of z, y, x). In these cases,

(5) = -(4)
(6) = -(3)
(7) = -(2)
(8) = -(1)

(13) = -(12)
(14) = -(11)
(15) = -(10)
(16) = -(9)

(21) = -(20)
(22) = -(19)
(23) = -(18)
(24) = -(17)

so it is sufficient to search only 12 cases,

(1) (2) (3) (4) (9) (10) (11) (12) (17) (18) (19) (20)

In these cases, (1) (9) (17) are always positive for any x, y, z.
And (2) (3) (4) (10) (18) (19) are also always positive.

 10   ' cube3.ub
 20   M%=1000 : dim T%(M%) : for I%=1 to M% : T%(I%)=0 : next I%
 30   '
 40   for Z%=0 to 10
 50     for Y%=0 to Z%
 60       for X%=0 to Y%
 70         R%=fnSub(X% , Y% , Z% ,"z") : ' (1)
 80         R%=fnSub(-X% , Y% , Z% ,"z") : ' (2)
 90         R%=fnSub(X% , -Y% , Z% ,"z") : ' (3)
100         R%=fnSub(-X% , -Y% , Z% ,"z") : ' (4)
110         R%=fnSub(X% , Y% , Z% ,"y") : ' (9)
120         R%=fnSub(-X% , Y% , Z% ,"y") : ' (10)
130         R%=fnSub(X% , Y% , Z% ,"z") : ' (17)
140         R%=fnSub(-X% , Y% , Z% ,"z") : ' (18)
150         R%=fnSub(X% , -Y% , Z% ,"z") : ' (19)
160       next X%
170     next Y%
180   next Z%
190   end
200   '
210   fnSub(X% , Y% , Z% , C)
220   local N , S%
230   N=X%^3+Y%^3+Z%^3
240   if C="x" then N=N+X%^3
250   if C="y" then N=N+Y%^3
260   if C="z" then N=N+Z%^3
270   if abs(N)>M% then 300
280   if T%(abs(N))=1 then 300
290   S%=sgn(N) : print S%*N , S%*X% , S%*Y% , S%*Z% , C : T%(S%*N)=1
300   return(0)

For (11) (12) (20)

First we consider the case (11).
The range of y when z is fixed.

-1000 ≤ x3 - 2y3 + z3 ≤ 1000
z3 - 1000 ≤ - x3 + 2y3 ≤ z3 + 1000

Lower bound of y.

- x3 + 2y3 ≤ 2y3

so

z3 - 1000 ≤ 2y3
cbrt((z3-1000)/2) ≤ y

changes into integer,

int(cbrt((z3-1000)/2))+1 ≤ y

Upper bound of y.

- x3 + 2y3 ≥ y3

so

y3 ≤ z3 + 1000
y ≤ cbrt(z3+1000)

changes into integer,

y ≤ int(cbrt(z3+1000))

If z is sufficient large, the right side becomes almost equal to y.
Therefore upper bound of y can be regarded as z-1.

Next, decide the range of x when z and y are fixed.

-1000 ≤ x3 - 2y3 + z3 ≤ 1000
- z3+2y3-1000 ≤ x3 ≤ - z3+2y3+1000

so lower bound is

max{0, int(cbrt(-z3+2y3-1000))+1} ≤ x

Upper bound is

x ≤ int(cbrt(-z3+2y3+1000))

(12) -x, -2y, z
(20) -2x, -y, z

are the same ways.

 10   ' cube4.ub : n = x^3 - 2y^3 + z^3
 20   M%=1000:dim T%(M%):for I%=1 to M%:T%(I%)=0:next I%
 30   '
 40   for Z=10 to 100000:Z3=Z^3
 50     Ys=int(exp(log((Z3-M%)/2)/3))+1
 60     for Y=Ys to Z-1:W=Z3-2*Y^3
 70       Xs=-M%-W:if Xs≤0 then Xs=1 else Xs=int(exp(log(Xs)/3))+1
 80       Xe=M%-W:Xe=int(exp(log(Xe)/3))+1
 90       for X=Xs to Xe:gosub 140:next X
100     next Y
110   next Z
120   end
130   '
140   N=W+X^3:V=abs(N):S=sgn(N):if V>M% then return
150   if T%(V)=1 then return
160   print V;":";X*S;",";-Y*S;",";Z*S;": y":T%(V)=1:return

Solutions of n=x3+y3+2z3    (0 ≤ n ≤ 10000, 0 ≤ |x| ≤ |y| ≤ |z| ≤ 106)


I found the following new results,

230 = (-14101)3 + 272933 + 2(-20617)3
418 = 159613 + 917053 + 2(-72914)3
482 = (-2254)3 + (-11878)3 + 2(9449)3
580 = 851113 + 898453 + 2(-87542)3

(August 7, 2000)

Results by Soichirou Ichida,

76 = (-21167)3 + (-122171)3 + 2*971353
967 = 3806983 + 6412633 + 2*(-542246)3

And by Jean-Charles Meyrignac,

482 = (-2254)3 + (-11878)3 + 2*94493
76 = (-21167)3 + (-122171)3 + 2*971353
967 = 3806983 + 6412633 + 2*(-542246)3

356 = 1295213 + 10484693 + 2*(-832693)3
445 = (-19178)3 + 1504393 + 2*(-119321)3
445 = (-240572)3 + 3776053 - 2*2712563

By Kenji Koyama (February 21, 2000)

183 = 41700613 + (-4494438)3 + 2*(2090533)3
491 = 134766593 + 135849083 + 2*(-13531000)3
931 = (-6942368)3 + (-23115371)3 + 2*(18510833)3

(September 07, 2002)

Many new results for 1000 ≤ n ≤ 10000 were found by Jean-Charles Meyrignac.
He extended the search range up to 4,000,000.

(May 04, 2003)

Mike Oakes tried up to 4,000,000 again, and found 6 results.

3982 = -2 * 332669^3 - 11077811^3 + 11078011^3
5972 = 2 * 2980937^3 + 3002495^3 - 4309669^3
6124 = -2 * 209552^3 - 17513657^3 + 17513677^3
7151 = 2 * 3667541^3 + 3004190^3 - 5010331^3
8581 = -2 * 3842861^3 - 66333785^3 + 66342382^3
8653 = 2 * 30046^3 + 4252402^3 - 4252403^3


Following solutions are unknown.

148, 671, 788
1084, 1121, 1247, 1444, 1462, 1588, 1975
2246, 2300, 2372, 2822
3047, 3268, 3307, 3335, 3380, 3641, 3676, 3956
4036, 4108, 4369, 4388, 4819, 4883, 4990
5188, 5279, 5468, 5540, 5620, 5629
6707, 6980
7097, 7106, 7132, 7177, 7323, 7519, 7708, 7727, 7799, 7853, 7862, 7988
8114, 8380, 8572, 8588, 8644, 8779, 8887, 8968
9274, 9463, 9589, 9724, 9850


previous index  

E-mail : kc2h-msm@asahi-net.or.jp
Hisanori Mishima