> Primes6 5 22Dec1996 JGH: Fast 6n-1, 6n+1 prime calculator : !M%=--500:M%>39999:M%=39999 T%=:P%M%:E%=P%+M%:!P%=2:P%!4=3:N%=5:I%=2:O%=P%+8:F%=:L%=N%:C%=P%+4:V%=!C%:C%=C%+4:F%=N%V%:F%=0V%>=L%:F%:!O%=N%:O%=O%+4 LF%:((O%-P%)4000)=0:;(O%-P%)4;" primes generated in ";(-T%)/100;"s" #N%=N%+I%:I%=I%6:O%>E%:T%=-T% "$;100*M%T%;" primes per second" , O%=0 M%-4 4 6 P%!O%; @+ (O% 31)=28: 8: (O% 255)=252: J: T ^ h r Uncrunched version: |(max%=--100: max%>39999:max%=39999  primes% max% primes%!0=2 primes%!4=3  number%=5 increment%=2  offset%=8 T%=   prime%= limit%= number% thistest%=4  1test%=primes%!thistest%:thistest%=thistest%+4 prime%=(number% test%)<>0  prime%=0 test%>=limit% A prime% primes%!offset%=number%:offset%=offset%+4:number% &8number%=number%+increment%:increment%=increment% 6 0 offset%>max% : T%=-T% D3;(max%+1)/4;" primes generated in ";T%/100;"s" N*;100*(max%+1)T%;" primes per second" X