$ \text{Let} \ S = \{p_1,p_2,p_3,...,p_n\} $ $ \text{where} \ p_i \in \Bbb P$
What is the fastest known method method/algorithm to generate all unique numbers through product operation on $S$?
$\text{Ex}: S= \{3,5,2\} $
Soln:
$3\times5 = 15$
$3\times2 = 6$
$3\times5\times2 = 30$
$5\times2 = 10$
Currently, my ideas hover around generating all subsets of $S$, multiplying all the members in each of them and eliminating the duplicates from the list of numbers so generated. This is $O(2^n)$.