simple programs to generate series