Question text is in black, answers in blue.
There are an infinite number of linear combinations of 1729 and 4096, and any of them will do. But you also need to tell me a method that would give a linear combination totalling to any other integer. Don't forget to also answer the question in the last sentence of the problem.
That's because 3.4.x is not in the book, though it deals with Section 3.4. It's the question about 5! + 1 that is written on the assignment page.
Sure, that's the way I intended you to solve
3.1.2, so it is ok to use for 3.1.1 as well. Just be sure to
include your code in your solution, since that is your proof that
you've found the first sequence for 3.1.2, or that you have 100
composites in a row for 3.1.1. It's true that factorials don't
matter for finding this solution, but they give you a quicker way to
find a solution without a computer. Remember that if you
deal with very large numbers, many ordinary things about computing
with them do not work. The number 100! is about 10157,
so you can't store it as an int
or a long
,
and if you store it as a double
the computer will
approximate it, so that "divisibility" no longer means
anything. There is a Java class called Bignum
that deals
with very large integers as integers. But the point is that you can
find the 100 numbers, expressed in terms of factorials, and show
fairly easily that they are all composite.
The plus
and times
definitions and methods each do two things. They define what should
happen if one of the arguments is zero, without any recursion. Then
in the other case, they use recursion (to the predecessor of one
argument) to define what should happen. In this case you will need to
recurse on both arguments, so you need to take care of the case
of either argument being zero. (In the code, this means making sure
that your code will never call pred
on a zero argument.)
That is a good idea. To get those numbers, you follow the example for x = 72 and y = 47 on pages 3-15 and 3-16. The second series of equations takes each of the numbers in the Euclidean Algorithm and expresses them as linear combinations of x and y, using the arithmetic from the first series of equations. The solution to Exercise 3.3.3 (c), in the back of the book, gives you the first series of equations for that particular x and y.
No, a sequence of composites is still a sequence of composites even it is followed directly by more composites. So if the first block of more than 13 consecutive composites actually has t composites in it, for some number t with t > 14, the right answer is the first 14 composites in this block. But if you tell me the whole block, that's acceptable too.
I'm sorry that this question was unclear for some people -- I'm still not sure why. Some Gaussian integers are called "units". These are the Gaussian integers whose length is exactly 1. Please list all the "units" for me.
You're right, the problem should say "any nonzero Gaussian integer" instead of "any Gaussian integer".
Last modified 27 October 2010