def collatz_sequence(n):
    """
    Returns a list with the Collatz sequence given n
    """
    collatz_sequence_list = [n]
    while n > 1:
        if n % 2 == 0:
            n = int(n / 2)
            collatz_sequence_list.append(n)
        else:
            n = int(3 * n + 1)
            collatz_sequence_list.append(n)
    return collatz_sequence_list