2009-01-11, 10:58 PM
Can you provide pseudocode of your main section? It's kinda opaque to me & I'm really not sure how long it would take.
Initial thought... I would create a "Prime" class.
fields - value & an array of bits corresponding to the other primes, 0 if they don't produce primes 1 if they do
eg. 3 -> 1*(3), 1(7), 1(11), 0(13), 1(17), ...
7 -> 1(3), 1*(7), 0(11), 0(13), 0(17), ...
11 -> 1(3), 0(7), 1*(11), 0(13), 0(17), ...
* - for calculation reasons, make it 1 with itself
Then to find out which ones work together, AND the arrays of bits.
Initial thought... I would create a "Prime" class.
fields - value & an array of bits corresponding to the other primes, 0 if they don't produce primes 1 if they do
eg. 3 -> 1*(3), 1(7), 1(11), 0(13), 1(17), ...
7 -> 1(3), 1*(7), 0(11), 0(13), 0(17), ...
11 -> 1(3), 0(7), 1*(11), 0(13), 0(17), ...
* - for calculation reasons, make it 1 with itself
Then to find out which ones work together, AND the arrays of bits.

