Computers and Technology
Computers and Technology, 21.06.2021 15:40, Yarls8819

(Ramanujan's Taxi) Srinivasa Ramanujan indian mathematician who became famous for his intuition for numbers. When the English mathemematician G. H. Hardy came ot visit him in the hospital one day, Hardy remarked that the number if his taxi was 1729, a rather dull number. To which Ramanujan replied, "No, Hardy! It is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways." Verify this claim by writing a program Ramanujan. java that takes a command-line argument N and prints out all integers less than or equal to N that can be expressed as the sum of two cubes in two different ways. In other words, find distinct positive integers a, b, c, and d such that а3 + b3 = c3 - d3. Hint: Use four nested for loops, with these bounds on the loop variables: 0 < a < 3√N, a < b < 3√N - a3, a < c < 3√N and c < d < 3√N - C3; do not explicitly compute cube roots, and instead use x . x *x < y in place of х < Math. cbrt (y). $ javac Ramanujan. java
$ java Ramanujan 40000
1729 = 1"3 + 12^3 = 9^3 + 10"3
4104 = 2^3 + 16^3 = 9^3 + 15^3
13832 = 2^3 + 24^3 = 18^3 + 20^3
39312 = 2^3 + 34^3 = 15^3 + 33^3
32832 = 4^3 + 32^3 = 18^3 + 30^3
20683 = 10^3 + 27^3 = 19^3 + 24^3

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:00, ittmanny6138
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
image
Computers and Technology, 23.06.2019 22:30, kayelynn003
How many points do i need before i can send a chat
Answers: 1
image
Computers and Technology, 24.06.2019 09:50, ira51
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
Answers: 2
image
Computers and Technology, 24.06.2019 13:00, brusawerin5969
Refer to the figure and match the theorem that supports the statement.1.if chords are =, then arcs are =.if bc = de, then arc bc = arc de2.if arcs are =, then chords are =.if arc bc = arc de, then bc = de3.diameters perpen
Answers: 3
Do you know the correct answer?
(Ramanujan's Taxi) Srinivasa Ramanujan indian mathematician who became famous for his intuition for...

Questions in other subjects:

Konu
Social Studies, 20.08.2019 13:30
Konu
Mathematics, 20.08.2019 13:30