def A036561():
    '''Numbers of the form 2^i 3^j, sorted according to the order of the tuples (i+j,j).
For more info see http://www.research.att.com/projects/OEIS?Anum=A036561'''
    yield 1
    for x in A036561():
        yield 2*x
        if x & 1:
            yield 3*x
Numbers of the form 2^i 3^j, sorted according to the order of the tuples (i+j,j).
For more info see http://www.research.att.com/projects/OEIS?Anum=A036561
recipes/Python/221457_Selfrecursive_generators/recipe-221457.py