Top "Primes" questions

Primes or prime numbers are integers greater than 1 which are divisible only by themselves and 1, i.e.: 2, 3, 5, 7, 11, ... .

Lazy List of Prime Numbers

How would one implement a list of prime numbers in Haskell so that they could be retrieved lazily? I am …

list haskell primes lazy-evaluation
Prime Number Algorithm

Can anyone tell me how to implement Sieve of Eratosthenes algorithm in C? I need to generate prime numbers but …

c algorithm optimization primes sieve-of-eratosthenes
Determining if a given number is a prime in haskell

So I have devised the following function for seeing if a given number is a prime in Haskell (it assumes …

algorithm haskell primes primality-test
What does "e is 65537 (0x10001)" mean?

I want to know what the output e is 65537 (0x10001) means. It happens during the RSA Key Generation using openssl …

openssl primes
Python OverflowError: cannot fit 'long' into an index=sized integer

I want to generate two really large prime numbers using an algorithm I found online and changed slightly. I get …

python rsa primes
Sieve of Atkin explanation

I am doing a project at the moment and I need an efficient method for calculating prime numbers. I have …

primes sieve-of-eratosthenes sieve-of-atkin
Sieve of Eratosthenes algorithm in JavaScript running endless for large number

I have been trying to write Sieve of Eratosthenes algorithm in JavaScript. Basically I just literally followed the steps below: …

javascript arrays algorithm primes sieve-of-eratosthenes
efficient ways of finding the largest prime factor of a number

I'm doing this problem on a site that I found (project Euler), and there is a question that involves finding …

python primes prime-factoring factorization
What is a sensible prime for hashcode calculation?

Eclipse 3.5 has a very nice feature to generate Java hashCode() functions. It would generate for example (slightly shortened:) class HashTest { …

java hashcode primes
Fast algorithm for finding prime numbers?

First of all - I checked a lot in this forum and I haven't found something fast enough. I try …

algorithm performance primes sieve-of-eratosthenes