add series exercise

Ported from xruby.