Ruby で作った

70.step(200, 2).inject(0) { |num, sum| sum + num }
#=> 8,910

from.step(to, step)
inject(初期値)は、蓄積変数(sum)に畳み込む