def hailstone(n):
sequence = [n]<EOL>while n > <NUM_LIT:1>:<EOL><INDENT>if n%<NUM_LIT:2> != <NUM_LIT:0>:<EOL><INDENT>n = <NUM_LIT:3>*n + <NUM_LIT:1><EOL><DEDENT>else: <EOL><INDENT>n = int(n/<NUM_LIT:2>)<EOL><DEDENT>sequence.append(n)<EOL><DEDENT>return sequence<EOL>
Return the 'hailstone sequence' from n to 1
       n: The starting point of the hailstone sequence