Differences between revisions 1 and 2
Revision 1 as of 2009-02-06 11:56:53
Size: 142
Editor: SimonMarsden
Comment:
Revision 2 as of 2009-02-06 12:28:05
Size: 895
Editor: SimonMarsden
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

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


CategoryPuzzles

TaxiCabNumbers/Solution (last edited 2009-02-08 21:52:34 by SimonMarsden)