In message <cd08f63ca2ad51e567d4288410f593da / ruby-forum.com>, Peter Marsh writes:
>But this isn't any good if you want a arithmetic [3,5,7,9] or geometric
>[2,6,18,54] series. So I suggest this:
>
>arithmetic_series = Arith.new(First_Term,Common_Difference)
>
>aritmetic_series[9] will then generate the 10th term of the sequence (0
>being the first to be consistent) and arithmetic_series[0..9] will
>return an array with the first to tenth terms. The same goes for a
>geometric series.
>
>gemometric_series = Geometric.new(First_Term,Common_Ratio)
>
>Now, there may be other ways to achieve this, but I think this way is
>nicer.

These seem like special cases of Series.new([Start Terms], Proc).

(Consider Fibbonacci sequences, for instance, or Pascal's Triangle.)

-s