Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Find prime number between 1 to 1000000

by tilly (Archbishop)
on Jan 24, 2011 at 05:19 UTC ( [id://883853]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Find prime number between 1 to 1000000
in thread Find prime number between 1 to 1000000

For Project Euler problems I already needed an iterator that iterates over primes. (Under the hood it uses the sieve of Eratosthenes to calculate blocks of primes and then returns them.)

If you already have that iterator, dividing by the primes up to and including the square root is quite easy.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://883853]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-19 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found