|
|
A032936
|
|
Numbers whose set of base-16 digits is {1,2}.
|
|
1
|
|
|
1, 2, 17, 18, 33, 34, 273, 274, 289, 290, 529, 530, 545, 546, 4369, 4370, 4385, 4386, 4625, 4626, 4641, 4642, 8465, 8466, 8481, 8482, 8721, 8722, 8737, 8738, 69905, 69906, 69921, 69922, 70161, 70162, 70177, 70178, 74001, 74002
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MATHEMATICA
|
Flatten[Table[FromDigits[#, 16]&/@Tuples[{1, 2}, n], {n, 5}]] (* Vincenzo Librandi, Jun 04 2012 *)
|
|
PROG
|
(Magma) [n: n in [1..75000] | Set(IntegerToSequence(n, 16)) subset {1, 2}]; // Vincenzo Librandi, Jun 04 2012
(Python)
def a(n): return int(bin(n+1)[3:].replace('1', '2').replace('0', '1'), 16)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|