def A005836():
    '''Numbers with no 2 in their ternary representation; discrete Cantor set;
lexicographically first arithmetic-progression-free sequence of integers.
For more info see http://www.research.att.com/projects/OEIS?Anum=A005836'''

    yield 0
    for x in A005836():
        if x:
            yield 3*x
        yield 3*x+1
Numbers with no 2 in their ternary representation; discrete Cantor set;
lexicographically first arithmetic-progression-free sequence of integers.
For more info see http://www.research.att.com/projects/OEIS?Anum=A005836
recipes/Python/221457_Selfrecursive_generators/recipe-221457.py