def seq_to_value(sequence):
    """Converts a sequence of base 4 numbers to an integer."""
    value = 0
    for i in range(0, len(sequence), 1):
        value += 4 ** i * sequence[-(i+1)]
    return value