def i_to_the_power(k):
    """
    Return the sign (-1 or 1) and minimal integer power (0 or 1) of i to an
    integer power.
    """
    sign = {0: 1, 1: 1, 2: -1, 3: -1}[k % 4]
    imaginary = k % 2
    return sign, imaginary