P1: A2 - Consecutive Primes (Archived)


Hi all,

I would like to congratulate all participants, but specially to Rick for winning the second problem and for achieve a fantastic performance. From my side, I am happy to have obtained the third position. My trial division algorithm is nothing special, and even when some improvements can double its speed (gross estimation), it is not good enough to beat Rick's solution. Vovanx86 also did a fantastic job, and there are also some very fast solutions who did not get a better result because of correctness problems.

Once again, Congratulation to everybody. Good job:o)

The Winners for Apprentice Problem 2, Consecutive Primes, will be announced later this week

Some final testing and analysis of the entries for Problem 2, Consecutive Primes, is being completed by the judges. We will be announcing the winners by the end of this week. Thanks for your patience.

The suspense is killing me!

I keep checking in here to see if there's any announcement on judging Consecutive Primes. It took six weeks to finish judging the first round (Maze of Life). It has now been seven weeks since this problem closed and no word yet on when the winners will be announced. I sure hope they can score the third round (Running Numbers) before the Grand Prize becomes moot.


Problem 2 was a fun one (the one i liked best to be honest) these are the optimalisations i used:

1) Prime generation

Generating primes is fun and can be done quickly but there's one thing even better not having to calculate them! However a table of all primes < 2^32 turned out to be about 800+ megs, too massive,the load time will have eaten me alive. Plus a binary search to find the proper start end end indexes wouldn't have been too snappy either.

Closing Date for Apprentice Level Problem 2, Consecutive Primes, extended to 12:00pm Noon, Pacific Daylight Time, Monday, June 6, 2011.

ApprenticeLevel Participants: My special gift to you. Due to my reminder message error regarding the closing date for theApprentice Level Problem 2, Consecutive Primes, we will formally extend the closing date for Problem 2 to 12:00pm, Noon, Pacific Daylight Time, Monday, June 6, 2011. We will update the website to reflect this change. If you have already submitted your entry, you may submit an updated entry by this new deadline. Hope you can take advantage of this extra time

Reminder: Apprentice Problem 2, Consecutive Primes, closes at 12:00pm Noon, Pacific Daylight Time, Monday, June 6, 2011

Just a reminder that Apprentice Problem 2, Consecutive Primes, closes at 12:00pm Noon, Pacific Daylight Time, Monday, June 6, 2011. Please make sure to submit your entry by this deadline.

Keep up the good work!


Hello,can you please send me more examples of the script expected results? These has been really useful but I need some with much much higher numbers to stress my script at its limit. Is it possible?Also, I wrote my entire code in C: is this ok?Thanks!J.sum(3:5) = 8 = 2**3
sum(17:19) = 36 = 6**2
sum(2:23) = 100 = 10**2
sum(13:19) = 49 = 7**2
sum(5:13) = 36 = 6**2

Assine o P1: A2 - Consecutive Primes (Archived)