A number is an   attractive number   if the number of its prime factors (whether distinct or not) is also prime.



Example

The number   20,   whose prime decomposition is   2 × 2 × 5,   is an   attractive number   because the number of its prime factors   (3)   is also prime.



Task

Show sequence items up to   120.



Reference

   The OEIS entry:   A063989: Numbers with a prime number of prime divisors.


get "libhdr"
manifest $( MAXIMUM = 120 $) 
 
let sieve(prime, max) be
$(  for i=0 to max do i!prime := i>=2
    for i=2 to max>>1 if i!prime
    $(  let j = i<<1
        while j <= max do
        $(  j!prime := false
            j := j+i
        $)
    $)
$)
 
let factors(n, prime, max) = valof
$(  let count = 0
    for i=2 to max if i!prime
        until n rem i 
        $(  count := count + 1
            n := n / i
        $)
    resultis count
$)
 
let start() be
$(  let n = 0 and prime = vec MAXIMUM
    sieve(prime, MAXIMUM)
    for i=2 to MAXIMUM
        if factors(i, prime, MAXIMUM)!prime
        $(  writed(i, 4)
            n := n + 1
            unless n rem 18 do wrch('*N')  
        $)
    wrch('*N')
$)