Group Abstract Group Abstract

Message Boards Message Boards

0
|
172 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Ramanujan's number: finding sum of two positive cubes

fi = 
 FindInstance[{a^3 + b^3 == c^3 + d^3, a != c, a != d}, {a, b, c, d}, 
  PositiveIntegers]

{{a -> 10, b -> 9, c -> 12, d -> 1}}


{a^3 + b^3, c^3 + d^3} /. fi

 {{1729, 1729}}

Solve, NSolve and Reduce cannot do this calculation

POSTED BY: Frank Kampas
3 Replies
In[6]:= s = 
 Select[Tuples[Range[12], 
   4], #[[1]]^3 + #[[
       2]]^3 == #[[3]]^3 + #[[4]]^3 && #[[1]] != #[[3]] && #[[1]] != \
#[[4]] &]

Out[6]= {{1, 12, 9, 10}, {1, 12, 10, 9}, {9, 10, 1, 12}, {9, 10, 12, 
  1}, {10, 9, 1, 12}, {10, 9, 12, 1}, {12, 1, 9, 10}, {12, 1, 10, 9}}

In[7]:= Table[{s[[i, 1]]^3 + s[[i, 2]]^3, 
  s[[i, 3]]^3 + s[[i, 4]]^3}, {i, Length[s]}]

Out[7]= {{1729, 1729}, {1729, 1729}, {1729, 1729}, {1729, 
  1729}, {1729, 1729}, {1729, 1729}, {1729, 1729}, {1729, 1729}}
POSTED BY: Frank Kampas

Frank,
As we discussed via email yesterday, Minimize works:

In[7]:= Minimize[{(a^3 + b^3 - c^3 - d^3)^2, a >= 1, b >= 1, c >= 1,  d >= 1, a <= 20, b <= 20, c <= 20, d <= 20, a != c, a != d}, {a, b, c, d} \[Element] Integers]
Out[7]= {0, {a -> 1, b -> 12, c -> 9, d -> 10}}

The upper bounds were chosen somewhat subjectively (knowing the H-R solution). Other reasonable bounds could also be chosen depending on how far one wants to go, in search of further H-R numbers.

Regards,
Janos

[Janos D. Pinter]

POSTED BY: Janos D. Pinter

It is known as the Hardy–Ramanujan number because of a famous conversation between mathematicians G. H. Hardy and Srinivasa Ramanujan.

Ramanujan pointed out that 1729 is the smallest positive integer that can be expressed as the sum of two positive cubes in two different ways:

Hardy had remarked that his taxi number, 1729, seemed rather dull. Ramanujan immediately replied that it was actually a very interesting number for precisely this reason.

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard