def sum_first_odds(n):
    """Return 1 + 3 + 5 + ... + (2n - 1), the sum of the first n odd numbers."""
    total = 0
    for k in range(1, n):
        total += 2 * k - 1
    return total
