def sum_num(start, stop, step=1):
    """Returns the sum of an arithmetic sequence, from ```start``` to ```stop```
    (inclusive), stepping by ```step```.

    Equivalent to ```sum(range(start, stop, step))``` \
    (but works better on large inputs)."""
    num_terms = (stop - start)//step + 1
    return (start+stop)*num_terms/2