gchick: Small furry animal wearing a tin-foil hat (Default)
gchick ([personal profile] gchick) wrote in [community profile] intro_to_cs 2009-11-12 01:40 pm (UTC)

nods whereas I looked at the divisibility-by-primes issue and decided to sacrifice the efficiency of *only* testing on primes in favor of the efficiency of not having to repeatedly call on the list comprehension functions (with the assumption that most composite numbers would be divisible by something *kinda* low and so wouldn't have to go through a ton of test iterations anyway). I'm now really curious to test further...

Of course, that's for choosing the 1000th prime; if I were trying to find the umpty-billionth, I'd probably try to find a way that wasn't brute-forcing it at all, but I'd also be making a lot more money in something crypto-related!

Post a comment in response:

This community only allows commenting by members. You may comment here if you're a member of intro_to_cs.
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting