def sequence(n): for i in range(1, n): print i, def even_sequence(n): for i in range(1, n): if i % 2 == 0: print i, def odd_sequence(n): for i in range(1, n, 2): print i, def exponent_sequence(n): for i in range(1, n): print i ** 2, def weird_sequence(n, weird_number): for i in range(1, n): if i % 3 == 0: print weird_number, elif i % 3 == 2: print i - 1, else: print i,