19 Jul
2007
19 Jul
'07
8:11 p.m.
Only if the number is square free. Else it generates the same factor multiple times. --ms Mike Stay wrote:
Well, here's a program that will generate them for you given the prime factors. Given n factors, for i=0 to 2^n - 1 d = 1 for j=0 to n-1 if bit j of i is set (*) d = d * jth factor end print d end
(*) in C, this is if (i & (1<<j))