With explanation, find the generating function g(x) (written as a product) for the number of partitions of n whose parts are distinct.