OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
FromDigits /@ Select[ IntegerDigits[ Range[210], 3], Union[ # ] == {1, 2} &] (* Robert G. Wilson v, Oct 09 2005 *)
Union[FromDigits/@Select[Flatten[Table[Tuples[{1, 2}, n], {n, 2, 5}], 1], Union[#] == {1, 2}&]] (* Harvey P. Dale, Sep 05 2013 *)
PROG
(Python)
from itertools import count, islice
def agen():
for i in count(1):
s = bin(i+1)[3:].replace('1', '2').replace('0', '1')
if 0 < s.count('1') < len(s):
yield int(s)
print(list(islice(agen(), 42))) # Michael S. Branicky, Dec 21 2021
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Alexandre Wajnberg & Youri Mora, Oct 08 2005
EXTENSIONS
More terms from Robert G. Wilson v, Oct 09 2005
Crossrefs from Charles R Greathouse IV, Aug 03 2010
STATUS
approved