%I #14 Sep 08 2022 08:44:51
%S 1,2,17,18,33,34,273,274,289,290,529,530,545,546,4369,4370,4385,4386,
%T 4625,4626,4641,4642,8465,8466,8481,8482,8721,8722,8737,8738,69905,
%U 69906,69921,69922,70161,70162,70177,70178,74001,74002
%N Numbers whose set of base-16 digits is {1,2}.
%H Vincenzo Librandi, <a href="/A032936/b032936.txt">Table of n, a(n) for n = 1..1000</a>
%t Flatten[Table[FromDigits[#,16]&/@Tuples[{1,2},n],{n,5}]] (* _Vincenzo Librandi_, Jun 04 2012 *)
%o (Magma) [n: n in [1..75000] | Set(IntegerToSequence(n, 16)) subset {1, 2}]; // _Vincenzo Librandi_, Jun 04 2012
%o (Python)
%o def a(n): return int(bin(n+1)[3:].replace('1', '2').replace('0', '1'), 16)
%o print([a(n) for n in range(1, 41)]) # _Michael S. Branicky_, Aug 22 2021
%K nonn,base
%O 1,2
%A _Clark Kimberling_