In this paper we study some structure properties of primitive weird numbers in terms of their factorization. We give sufficient conditions to ensure that a positive integer is weird. Two algorithms for generating weird numbers having a given number of distinct prime factors are presented. These algorithms yield pri- mitive weird numbers of the form mp1 ... pk for a suitable deficient positive integer m and primes p1 , ... , pk and generalize a recent technique developed for generating primitive weird numbers of the form 2n p1 p2 . The same techniques can be used to search for odd weird numbers, whose existence is still an open question.