Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (loop
- with arr = (make-array (1+ maxi)
- :element-type 'bit
- :initial-element 0)
- for numb from 2 to (isqrt maxi)
- when (zerop (bit arr numb))
- collect numb
- and do (loop for composite from (expt numb 2)
- to maxi by numb
- do (setf (bit arr composite) 1))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement