Prime Sieve Index   <<   >>


 

i made an apl prime sieve thats far less verbose than any other one i’ve ever seen:

      ⍸(is 100){(0@(∊⍵×(1↓⍳)¨⌊⍵÷⍨≢⍺))⍺}2 3 5 7
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 
   79 83 89 97

where is←{0,(⍵-1)⍴1} represents the blank sieve of length


A Twitter post from user @feeb