Re: Beginners prime number generator



On 2006-12-06, SM Ryan wrote:
Joel Mayes <j.mayes@xxxxxxxxxxxxxxx> wrote:
#
# Hi All;
#
# I'm teaching myself C, and have written a prime number generator. It is
# a pretty inefficient implementation of the Sieve of Eratosthenes to
# calculate primes up to 1,000,000. If anyone has time to critic and offer
# my some feedback I'd be grateful

Why not the first million primes?

<SNIP>

'cause I don't know enough C to grok your code :-)

Give me a couple of hours to read it through...

Thanks

Joel
.



Relevant Pages

  • AP-Prime-Generator APPG Re: possible Riemann Hypothesis proof; #137;
    ... rather strange since Euclid's Number in Euclid's Infinitude of Primes ... have devised a Generator of primes, all the primes in that time period. ... So it looks ideal for the Moebius function ... of the Sieve of Eratosthenes. ...
    (sci.math)
  • Re: order of an element
    ... >The question of what order residue 2 has in Z/pZ, p an odd prime, ... >primes, ... >generator of this cyclic group for infinitely many odd primes p. ... >of primes p for which non-square a> 1 is a primitive root). ...
    (sci.math)
  • Re: order of an element
    ... The question of what order residue 2 has in Z/pZ, p an odd prime, ... primes, ... generator of this cyclic group for infinitely many odd primes p. ... of primes p for which non-square a> 1 is a primitive root). ...
    (sci.math)
  • Re: How can I speed up a script that iterates over a large range (600 billion)?
    ... "primes" generator checks to determine whether each number is prime is ... # odd multiple of p; p+p is the increment to get to the next ... # Mark odd nonprimes within each of the requested ranges. ...
    (comp.lang.python)
  • Re: algebraic question
    ... >Let p,q be large primes with p=2q+1. ... Let g be a generator of a group G ... that g is a generator of the multiplicative group of the ring Z_p. ...
    (sci.math)