Taxicab numbers
Description:
1729 is the Hardy–Ramanujan number after a famous anecdote of the British mathematician G. H. Hardy regarding a visit to the hospital to see the Indian mathematician Srinivasa Ramanujan. In Hardy's words:
"I remember once going to see him when he was ill at Putney. I had ridden in taxi cab number 1729 and remarked that the number seemed to me rather a dull one, and that I hoped it was not an unfavorable omen. "No," he replied, "it is a very interesting number; it is the smallest number expressible as the sum of two cubes in two different ways.""
The two different ways are:
1729 = 13 + 123 = 93 + 103
A Ramanujam number (also called taxicab number) can be written two different ways as the sum of two cubes, i.e., there exist distinct a, b, c, and d such that a^3 + b^3 = c ^ 3 + d ^ 3.
Your task is to generate all Ramanujan numbers where 0 < a, b, c, d <= n.
Similar Kata:
Stats:
Created | Jan 10, 2016 |
Published | Jan 12, 2016 |
Warriors Trained | 66 |
Total Skips | 7 |
Total Code Submissions | 90 |
Total Times Completed | 11 |
Ruby Completions | 11 |
Total Stars | 1 |
% of votes with a positive feedback rating | 60% of 5 |
Total "Very Satisfied" Votes | 2 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 9 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |