generating product sequences from formulas