Taxicab numbers: Difference between revisions

Content deleted Content added
Trizen (talk | contribs)
m →‎{{header|Sidef}}: updated code
m re-instated the original text for the task's preamble as written by the author (with whitespace and also taxicab aliases).
Line 1: Line 1:
{{task|Mathematics}}
{{task|Mathematics}}


A [[wp:Hardy–Ramanujan number|taxicab number]] (the definition that is being used here) is a positive integer that can be expressed as the sum of two positive cubes in more than one way.
A   [[wp:Hardy–Ramanujan number|taxicab number]]   (the definition that is being used here)   is a positive integer that can be expressed as the sum of two positive cubes in more than one way.


The first taxicab number is 1729 : 1<sup>3</sup> + 12<sup>3</sup> = 9<sup>3</sup> + 10<sup>3</sup>


The first taxicab number is &nbsp; '''1729''', &nbsp; which is:
::: 1<sup>3</sup> &nbsp; + &nbsp; 12<sup>3</sup> &nbsp; &nbsp; &nbsp; and
::: 9<sup>3</sup> &nbsp; + &nbsp; 10<sup>3</sup>.


;Task requirements


Taxicab numbers are also known as:
::* &nbsp; taxi numbers
::* &nbsp; taxi-cab numbers
::* &nbsp; taxi cab numbers
::* &nbsp; Hardy-Ramanujan numbers


;Task:
* Compute and display the lowest 25 taxicab numbers (in numeric order, and in a human-readable format).
* Compute and display the lowest 25 taxicab numbers (in numeric order, and in a human-readable format).
* For each of the taxicab numbers, show the number as well as it's constituent cubes.
* For each of the taxicab numbers, show the number as well as it's constituent cubes.