provide implementations of the series and sequence templates; use these new templates for the pi template