def geom(start=1, factor=2):
    """
    iterator to generate geometric series
    :param start: start number
    :param factor: constant factor to apply
    :return: geometric series, e.g. geom(16, 0.5) -> 16 8 4 2 1 0.5 ...
    """
    n = start
    while True:
        yield n
        n *= factor
