Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 16 Online
OpenStudy (anonymous):

PS1b. Does this look right? http://dpaste.com/559520/

OpenStudy (anonymous):

yes-ish. It looks right, it looks good. The only thing is, when I was doing this, people said that you are not supposed to include the nth prime, up to the nth prime. So when I ran yours for 1000th, my sum was 7803.30652052 and ratio 0.985390392792, yours is 7811.590393552279 and ratio is 0.985800789269. So I presume the difference is that you added the final nth.

OpenStudy (anonymous):

hmm.so i changed it to this http://dpaste.com/559523/ and i keep geting wrong numbers. i dont get it

OpenStudy (anonymous):

I think... the first candidate is 3. But 2 is a prime. Your initial log_sum figure should reflect this.

OpenStudy (anonymous):

oh. i think i got it now. http://dpaste.com/559542/ think its working fine. thanks a lot for the help

OpenStudy (anonymous):

:)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!