def arithmetic_series(a: int, n: int, d: int = 1) -> int:
    """Returns the sum of the arithmetic sequence with parameters a, n, d.

    a: The first term in the sequence
    n: The total number of terms in the sequence
    d: The difference between any two terms in the sequence
    """

    return n * (2 * a + (n - 1) * d) // 2