Also avalaible: french version
For optimal display when display file content on Github, uncheck "Wrap lines (under View options)" from the "... (More file actions)" menu.
Feel free to open an issue if you wish to discuss.
And add a ⭐ if you like 😉.
Introduction
Details on wikipedia.
Refers to A011541 OEIS sequence, and A001235 OEIS sequence for non-primitives solutions.
See also Boyer's site and Boyer's 2008 PDF paper (or archive).
See also Po-Chi Su's 2016 PDF paper.
Taxicab(n) - or Ta(n) or T(n) or T(n, 1) or Taxicab(3, n, n) - is the smallest number expressible as a sum of two positive cubes in n different ways.
For n > 6, as described in Boyer's paper, there is an upper bound list, as BTa(n) described in OEIS sequence.
Ta(n) <= BTa(n) = r * s, with r < s
r = x + y = sqrt(3xy + s), with x < y
s = x² - xy + y² = x² + y * (y - x) = r² - 3xy = xy + (y - x)² = xy + delta_b
delta_a = 12s - 3r², delta_a = 9 * delta_b
delta_b = (4s - r²) / 3 = r² - 4xy = (y - x)²
x = (3r - sqrt(delta_a)) / 6 = (r - sqrt(delta_b)) / 2
y = (3r + sqrt(delta_a)) / 6 = (r + sqrt(delta_b)) / 2
sqrt(delta_a) = 3 * (y - x) = 3 * (s - x²) / y
xy = (r² - s) / 3
y - x = sqrt(delta_a) / 3 = sqrt(delta_b)
Note that s can also be written: s = (y - x)² + x * y
then for each {x,y}, Ta(n) = sum * ( diff² + product )
and Ta(n) = r³ - 3xyr then sum² - diff² = 4 * product
Let x(n, i) and y(n, i) denote the i th x and y for BTa(n) or Ta(n).
If x or y is odd (but not both):
w = (y + x + 1) / 2 = (r + 1) / 2
v = (y - x - 1) / 2 = y - w = (sqrt(delta_a) - 1) / 6
Ta(n) <= BTa(n) = (w - v - 1)³ + (v + w)³
else (if x and y are both even or are both odd)
w = (x + y) / 2 = r / 2
v = (y - x) / 2 = y - w = sqrt(delta_a) / 6
Ta(n) <= BTa(n) = (w - v)³ + (v + w)³
Decomposition of Ta(n) or BTa(n)
- source code contains all {x,y} values with {r,s} and delta_a components for checking matches
- text output of the program execution shows if values are correct
- taxicab_x contains x values
- taxicab_y contains y values
- taxicab_r contains r values
- taxicab_s contains s values
Relationships
-
BTa(24) <= 381489286124430409319768596454988766303873589432584556125228221326120950488322054793438654594075836788861479033831645270800877473265863391069226260470316824340088274129522154177976000000000
- z = 59 * 1543 = 91037
- BTa(24) = z^3 * BTa(23)
-
BTa(23) <= 505624992450102221744244678441689845434887715317085055675501100061664233777550644179891369792998312033624027623507268993575520089167244066787797454194149200985506392000000000
- z = 97 * 491 = 47627
- BTa(23) = z^3 * BTa(22)
-
BTa(22) <= 4680247859298792255465896583920257161776853980641720488623945439873944558056759119053262369879441902130153472288312996410513410535472957059046536164424000000000
- z = 11 * 31 * 103 = 35123
- BTa(22) = z^3 * BTa(21)
-
BTa(21) <= 108017480260055891349349434078007118409816211596074421874782013152781209964290521967447172971431469705047741717793222992124981940703226072000000000
- z = 127 * 197 = 25019
- BTa(21) = z^3 * BTa(20)
- {x(21, i), y(21, i)} = z * {x(20, i), y(20, i)} (except for i=7)
-
BTa(20) <= 6897380753715950027554119762858815120976857451913869723850868496922922856256366585322070924221550029921862628606999892276808000000000
- z = 5^2 * 457 * 521 = 5952425
- BTa(20) = z^3 * BTa(18)
- {x(20, i), y(20, i)} = z * {x(18, i), y(18, i)} (except for i=14)
-
BTa(19) <= 89155799373431424956779039683208074195259067508030416952016859893056008200986665364956362114476625742414288155368000000000
-
BTa(18) <= 32704115261272222010108668321371490956498583891096244871994833214348230808345220932546725287574509356813791744000
- z = 37 * 181 = 6697
- BTa(18) = z^3 * BTa(17)
- {x(18, i), y(18, i)} = z * {x(17, i), y(17, i)} (except for i=1)
-
BTa(17) <= 108883358434560363503260016942467566965657808716401027019007732065428469239764403684536752685040128000
- z = 4261
- BTa(17) = z^3 * BTa(16)
- {x(17, i), y(17, i)} = z * {x(16, i), y(16, i)} (except for i=3)
-
BTa(16) <= 1407430328457240141244921568479580896498768360005757901394557724136294559835243494681088000
- z = 2 * 607 = 1214
- BTa(16) = z^3 * BTa(15)
- {x(16, i), y(16, i)} = z * {x(15, i), y(15, i)} (except for i=12)
-
BTa(15) <= 786630615595626829796137755567437844038832146564530660386728812791938555036352000
- z = 503
- BTa(15) = z^3 * BTa(14)
- {x(15, i), y(15, i)} = z * {x(14, i), y(14, i)} (except for i=4)
-
BTa(14) <= 6181115942163278484307116174514304039670628856329988877227399275142976000
- z = 397
- BTa(14) = z^3 * BTa(13)
- {x(14, i), y(14, i)} = z * {x(13, i), y(13, i)} (except for i=6)
-
BTa(13) <= 98785992977316717572070208794037178343163969803121800608526912000
- z = 3 * 61 = 183
- BTa(13) = z^3 * BTa(12)
- {x(13, i), y(13, i)} = z * {x(12, i), y(12, i)} (except for i=4)
-
BTa(12) <= 16119148654034302034428760115512552827992287460693283776000
- z = 3 * 19 = 57
- BTa(12) = z^3 * BTa(11)
- {x(12, i), y(12, i)} = z * {x(11, i), y(11, i)} (except for i=2)
- {x(12,12), y(12,12)} do not contain 7
- {x(12, 5), y(12, 5)} do not contain 13
- {x(12, 4), y(12, 4)} do not contain 17
-
BTa(11) <= 87039729655193781808322993393446581825405320183232000
- {x(11,11), y(11,11)} do not contain 7
- {x(11, 4), y(11, 4)} do not contain 13
- {x(11, 3), y(11, 3)} do not contain 17
-
BTa(10) <= 7335345315241855602572782233444632535674275447104
- z = 13 * 29 = 377
- BTa(10) = z^3 * BTa(9)
- {x(10, i), y(10, i)} = z * {x(9, i), y(9, i)} (except for i=2)
- {x2, y2} do not contain 13 * 29
- {x3, y3} do not contain 139
- {x5, y5} do not contain 101
-
BTa(9) <= 136897813798023990395783317207361432493888
- z = 139
- BTa(9) = z^3 * BTa(8)
- {x(9, i), y(9, i)} = z * {x(8, i), y(8, i)} (except for i=2)
-
BTa(8) <= 50974398750539071400590819921724352
- z = 127
- BTa(8) = z^3 * BTa(7)
- {x(8, i), y(8, i)} = z * {x(7, i), y(7, i)} (except for i=8)
-
BTa(7) <= 24885189317885898975235988544
- z = 101
- BTa(7) = z^3 * BTa(6)
- {x(7, i), y(7, i)} = z * {x(6, i), y(6, i)} (except for i=3)
-
Ta(6) = 24153319581254312065344
- z = 79
- BTa(6) = z^3 * BTa(5)
- {x(6, i), y(6, i)} = z * {x(5, i), y(5, i)} (except for i=1)
-
Ta(5) = 48988659276962496
-
Ta(4) = 6963472309248
-
Ta(3) = 87539319
- Ta(3) = (302 - 134 -1)³ + (302 + 134)³ = (326 - 97 - 1)³ + (326 + 97)³ = (335 - 79 - 1)³ + (335 + 79)³
-
Ta(2) = 1729
-
Ta(1) = 2
Others non-primitive solutions
T(19,?) <= 20400824749409517528805616329601248054238975120047899653306832282155305931553802798551427446267572330642814901020208524571911529017539708401834884288000 = 2^9 * 3^12 * 5^3 * 7^4 * 11^3 * 13^4 * 17^3 * 19 * 29^3 * 41^3 * 43 * 73 * 79^3 * 97 * 101^3 * 127^3 * 139^3 * 157 * 271^3 * 349^3 * 601^3 * 727^3 * 733^3 * 2311^3 * 2971^3 * 4327^3 * 7549^3
T(18,?) <= 1669102760262770599073633207770749663711833995754118800009115774272350540676865796358235477762975575548685960795354954969975483624898697728 = 2^9 * 3^12 * 7^4 * 11^3 * 13^4 * 19 * 29^3 * 41^3 * 43 * 73 * 79^3 * 97 * 101^3 * 127^3 * 139^3 * 157 * 349^3 * 601^3 * 727^3 * 733^3 * 2311^3 * 2971^3 * 4327^3 * 7549^3
T(17,?) <= 390632494425592857308683115941747067399542361030496398592266116103976300384768055853952870509972688279894938439376270144482816 = 2^9 * 3^3 * 7^4 * 11^3 * 13^4 * 19 * 29^3 * 41^3 * 43 * 73 * 79^3 * 97 * 101^3 * 127^3 * 139^3 * 157 * 349^3 * 727^3 * 733^3 * 2311^3 * 2971^3 * 4327^3 * 7549^3
T(16,?) <= 133333879575067044255496407342541909372921060713622256889696224426242257299346008208169434186136206003482924680704 = 2^9 * 3^3 * 7^4 * 11^3 * 13^4 * 19 * 29^3 * 43 * 73 * 79^3 * 97 * 101^3 * 127^3 * 139^3 * 157 * 727^3 * 733^3 * 2311^3 * 2971^3 * 4327^3 * 7549^3
T(15,?) <= 254361007450418467683691805874871224061387429621450309607817376336263717732850126485501423293412997632 = 2^9 * 3^3 * 7^4 * 13^4 * 19 * 29^3 * 43 * 73 * 79^3 * 97 * 101^3 * 127^3 * 139^3 * 157 * 727^3 * 2311^3 * 2971^3 * 4327^3
T(14,?) <= 591265120715306076227178149379165201865336472346517495072293984450950965960475614042157568 = 2^9 * 3^3 * 7^4 * 13^4 * 19 * 29^3 * 43 * 73 * 79^3 * 97 * 101^3 * 127^3 * 139^3 * 157 * 727^3 * 2311^3 * 2971^3 * 4327^3
T(13,?) <= 5988146776742829080553965820313279739849705084894534523771076163371248442670016 = 2^6 * 3^3 * 7^4 * 13^4 * 19 * 29^3 * 43 * 73 * 79^3 * 97 * 101^3 * 127^3 * 139^3 * 157 * 727^3 * 2971^3 * 4327^3
T(7, ?) = 64866613980488624314617087936 = 2^6 * 3^3 * 7^4 * 13 * 19 * 43 * 73 * 79^3 * 97 * 139^3 * 157
x1 = 80920518 = 2 * 3 * 7 * 83 * 139 * 167
x2 = 317835644 = 2^2 * 7 * 79 * 143687
x3 = 425920047 = 3 * 7 * 79 * 139 * 1847
x4 = 1184180059 = 79 * 139 * 107839
x5 = 2254311452 = 2^2 * 17 * 79 * 139 * 3019
x6 = 2431456944 = 2^4 * 3 * 7 * 79 * 139 * 659
x7 = 2542299158 = 2 * 7 * 23 * 79 * 139 * 719
y7 = 3645186874 = 2 * 7 * 79 * 131 * 139 * 181
y6 = 3696072828 = 2^2 * 3 * 7 * 79 * 139 * 4007
y5 = 3765955912 = 2^3 * 79 * 139 * 163 * 263
y4 = 3983390693 = 79 * 139 * 362753
y3 = 4016377617 = 3 * 7 * 79 * 139 * 17417
y2 = 4017310528 = 2^6 * 7 * 11 * 17 * 79 * 607
y1 = 4017962634 = 2 * 3 * 7 * 139 * 311 * 2213
T(4, ?) = 1801049058342701083 = 7 * 31 * 37 * 43 * 163 * 193 * 9151 * 18121
x1 = 92227
x2 = 136635 = 3 * 5 * 9109
x3 = 341995 = 5 * 68399
x4 = 600259 = 11 * 197 * 277
y4 = 1165884 = 2^2 * 3 * 97157
y3 = 1207602 = 2 * 3^3 * 11 * 19 * 107
y2 = 1216102 = 2 * 23 * 26437
y1 = 1216500 = 2^2 * 3 * 5^3 * 811
T(3, ?) = 15170835645 = 3^2 * 5 * 7 * 31 * 37 * 199 * 211
x1 = 517 = 11 * 47
x2 = 709
x3 = 1733
y3 = 2152 = 2^3 * 269
y2 = 2456 = 2^3 * 307
y1 = 2468 = 2^2 * 617
T(3, 4) = 175959000 = 35^3 ∗ T(2, 2)
x1 = 70 = 2 * 5 * 7
x2 = 198 = 2 * 3^2 * 11
x3 = 315 = 3^2 * 5 * 7
y3 = 525 = 3 * 5^2 * 7
y2 = 552 = 2^3 * 3 * 23
y1 = 560 = 2^4 * 5 * 7
T(2, 2) = 4104 = (12 − 3)³ + (12 + 3)³ = 2³ * (1³ + 8³)
x1 = 2
x2 = 9 = 3^2
y2 = 15 = 3 * 5
y1 = 16 = 2^4