Just another Perl shrine  
PerlMonks 
Re^3: Hamming Sequences and Lazy Listsby kvale (Monsignor) 
on Mar 17, 2005 at 17:38 UTC ( #440454=note: print w/ replies, xml )  Need Help?? 
Given the OP's reference to the factors of a composite number thread, I interpreted 'use an unlimited number of times" to mean create numbers of the form with $i, $j, and $k as integers >= 0. The program I wrote generalizes this by handling an arbitrary number of arbitrary factors. I don't know what you mean by 'factors of 3 lists', but if I guess that each list is a multiple of each factor, then I think that must not be right. The example given by the OP had 1 as the first member, but 1 is not any multiple 2, 3, or 5. That said, there is an error my program :) 16 should be in the list even in my understanding of the problem. The mistake with is that the bound on the $depth I set was too low. In the harsh light of the morning, a safe bound is But I am sure this bound can be made tighter, right after I have some tea :) Mark
In Section
Seekers of Perl Wisdom

