Taxicab numbers: Difference between revisions

m
Line 2,230:
* n=3</pre>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>findTaxi[n_] := Sort[Keys[Select[Counts[Flatten[Table[x^3 + y^3, {x, 1, n}, {y, x, n}]]], GreaterThan[1]]]];
Take[findTaxiNumbers[100], 25]
Line 2,237:
{{out}}
<pre>{1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597}
 
{1671816384, 1672470592, 1673170856, 1675045225, 1675958167, 1676926719}
 
{(x == 944 && y == 940) || (x == 1168 && y == 428),
(x == 1124 && y == 632) || (x == 1187 && y == 29),
1,111

edits