⇤ ← Revision 1 as of 2009-02-06 11:56:53
Size: 142
Comment:
|
Size: 895
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
Page under construction | <<TableOfContents>> '''Page under construction ''' Here's one solution to the Taxi Cab function: {{{ ∇R←TaxiCab N;⎕IO;vals;sumCubes;cubes [1] ⎕IO←1 [2] vals←⍳N [3] sumCubes←(vals∘.<vals)×cubes∘.+cubes←vals*3 [4] R←(R=1⌽R)/R←R[⍋R←(,sumCubes)~0] [5] R←⍉R,[0.5](,¨(R⍷¨⊂sumCubes)×⊂vals∘.,vals)~¨⊂⊂0 0 ∇ }}} For example: {{{ TaxiCab 30 1729 1 12 9 10 4104 2 16 9 15 13832 2 24 18 20 20683 10 27 19 24 }}} The output shows the taxi cab number followed by the pairs of terms. For example 1729 = 1^3^ + 12^3^ = 9^3^ + 10^3^ = An explanation of the APL code = Blah : Under construction = Other investigations concerning 1729 = Blah : Under construction |
Ramanujan's Taxi Cab Numbers : A Solution
Contents
Page under construction
Here's one solution to the Taxi Cab function:
∇R←TaxiCab N;⎕IO;vals;sumCubes;cubes [1] ⎕IO←1 [2] vals←⍳N [3] sumCubes←(vals∘.<vals)×cubes∘.+cubes←vals*3 [4] R←(R=1⌽R)/R←R[⍋R←(,sumCubes)~0] [5] R←⍉R,[0.5](,¨(R⍷¨⊂sumCubes)×⊂vals∘.,vals)~¨⊂⊂0 0 ∇
For example:
TaxiCab 30 1729 1 12 9 10 4104 2 16 9 15 13832 2 24 18 20 20683 10 27 19 24
The output shows the taxi cab number followed by the pairs of terms. For example 1729 = 13 + 123 = 93 + 103
An explanation of the APL code
Blah : Under construction
Other investigations concerning 1729
Blah : Under construction
<< The task