This question already has answers here: Closed 12 years ago. Possible Duplicate: How to determine if a number is a prime with regex?
I\'m trying to make a decent Java program that generates the primes from 1 to N (mainly for Project Euler problems).
I can not figure out why this wo开发者_如何学编程n\'t work. Please help me from math import sqrt
I\'m trying to find the sum of the prime numbers < 2,000,000. This is my solution in Java but I can\'t seem get the correct answer. Please give so开发者_Go百科me input on what could be wrong and ge
Here\'s my implementation of Sieve of Erathosthene in Clojure (based on SICP lesson on streams): (defn nats-from [n]
I am trying to write a simple sieve function to calculate prime numbers in clojure.I\'ve seen this question about writing an efficient sieve function, but I am not to that point yet.Right now I am jus
I\'m aware of the function BigInteger.probablePrime(int bitLength, Random rnd) that outputs probably prime number of any bit length. I want a REAL prime number in Java. Is there any FOSS library to do
I made a program that returns the sum of all primes under 2 million. I really have no idea what\'s going on with this one, I get 142891895587 as my answer when the correct answer is 142913828922. It s
I recently was part of a small java programming competition at my school. My partner and I have just finished our first pure oop class and most of the questions were out of our league so we settled on
I\'m trying to solve problem 50 on Project Euler. Don\'t give me the answe开发者_运维百科r or solve it for me, just try to answer this specific question.