Cabtaxi Number

Author

Eric W. Weisstein
February 2, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/DiophantineEquations/CabtaxiNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/CabtaxiNumber.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Brute-Force

CabTaxi[n_,max_]:=Module[{c=Floor[max^(1/3)]},{#[[1,1]],(First/@Rest/@#)^(1/3)}&/@Select[Split[Sort[{Total[#],#}&/@Subsets[Join[-Range[c,1,-1],Range[c]]^3,{2}]],First[#1]==First[#2]&],Length[#]==n&]/.(-1)^(1/3) x_.:>-x
]

CabTaxi[1,100]

b=.

Reduce[a^3+b^3==c^3+d^3&&Abs[a]≠Abs[b]≠Abs[c]≠Abs[d]&&And@@(-7<#<7&/@{a,b,c,d}),{a,b,c,d},Integers]

CabTaxi[2,10^3]

First/@%

CabTaxi[3,10^5]

First/@%