def collatz(n):
    """
    Returns list of numbers generated by 
    Collatz conjecture [1] sequence.

    n: integer
        The starting number.

    [1]: https://en.wikipedia.org/wiki/Collatz_conjecture
    """
    seq = [n] # initialize list.

    while n != 1:
        if n%2 == 0:
            n = n/2
        else:
            n = 3*n + 1

        seq.append( n )

    return seq