beginningpython arithmetic_sequence.py

use generator and itertools: islice, takewhile