Let \(C(n, p)\) denote the set of all subsets of \(\{1, 2, \ldots, n\}\) whose sum is \(p\), and let \(C(n, k, p)\) denote the \(k\)-element sets of \(C(n, p)\). We show that the elements of \(C(n, p)\) and \(C(n, k, p)\) can be generated efficiently by simple recursive algorithms. The subsets are represented by characteristic bitstrings and by lists of elements. These representations can be generated in time that is proportional to the number of subsets generated.