The Harmon Prime Theorem says:
For
every even number (greater or equal to 4) there exist at least
one
pair of prime numbers, such that their sum is the given even number.
We had been working on several math-related projects with Dr. Harmon, but this is far the most developed problem of ours. (Should I say that it is also our "favourite" problem?)
The program calculates a graph, that relates the number of possible prime-sums to each even number between zero and the specified limit. Naturally, for 0, and 2, there are no prime-sums, for 4 and 6 there is only one. Notice, we only count 3+5, and ignore 5+3, which is eventually the same.
It might be helpful, if I described how you can use the program. First of all, you need to specify the limit for even numbers. The simpliest call to the program would look like this:
PR.EXE limit, where limit is the upper limit
The second parameter is the type of graph you would like to see the results in. The following options are available:
0 = line graph
1 = bar graph
2 = change graph
3 = rough point graph
4 = fine point graph
I would suggest using the last two types of graphs for higher limits, such as 10, or 20,000. The first three can be used for smaller limits.
Now you will probably not want to use more than two parameters when you are using the program, but I also provided two more parameters. The third one basicly is a file name, where you want to save all the !new! calculations in text format. This operation does not affect the binary file called DONE.BIN that stores all the calculations already made.
The fourth, and last parameter is the color of the graph. This is a number parameter, between 0-15, each representing a color that corresponds to the usual programming languages' color usage.
I should mention DONE.BIN in a little broader manner, because there are several essential pieces of information about this file that you should be aware of. First of all, nothing is saved into this file unless the calculations are fully! done, that is right before plotting the final graph. If you reset your computer during calculations, it should not affect your old file, but the new calculations are not going to be saved. To avoid the possible loss of data in case of longer calculations, I implemented a nice little option, that is when you press <Space> the calculations that are done at that point are going to be saved into DONE.BIN. Naturally, when the calculations are finished the program automaticly saves the new information into the file.
The advantage of having DONE.BIN is pretty obvious: there is no need to recalculate all the information every time you run the program. For this reason, the first step in calculating a new graph is loading in the previously saved information from DONE.BIN, and continueing it until we reach the appropriate limit. And then DONE.BIN is updated.
You might wonder how you could tell how much calculations are done before running the program, in other words what is the limit upto which the calculations are saved into DONE.BIN. Well, it is fairly simple: subtract 4 from the size of DONE.BIN.
I hope you will have fun with the program, and if you have any question, suggestion, or advice I would appreciate if you let me hear about them.