Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

RE: sieve of erothenes

by ferrency (Deacon)
on Jul 08, 2000 at 01:01 UTC ( #21580=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
    
  2. or download this
    for(1..100){push@_,$_ if (1 x $_) !~ /^1?$|^(11+?)\1+$/}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://21580]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2017-04-25 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (463 votes). Check out past polls.