login
A032840
Numbers whose set of base-16 digits is {3,4}.
1
3, 4, 51, 52, 67, 68, 819, 820, 835, 836, 1075, 1076, 1091, 1092, 13107, 13108, 13123, 13124, 13363, 13364, 13379, 13380, 17203, 17204, 17219, 17220, 17459, 17460, 17475, 17476, 209715, 209716, 209731, 209732, 209971, 209972
OFFSET
1,1
MATHEMATICA
Flatten[Table[FromDigits[#, 16]&/@Tuples[{3, 4}, n], {n, 5}]] (* Vincenzo Librandi, May 31 2012 *)
PROG
(Magma) [n: n in [1..265000] | Set(IntegerToSequence(n, 16)) subset {3, 4}]; // Vincenzo Librandi, May 31 2012
(Python)
def a(n): return int(bin(n+1)[3:].replace('1', '4').replace('0', '3'), 16)
print([a(n) for n in range(1, 37)]) # Michael S. Branicky, Aug 22 2021
CROSSREFS
Sequence in context: A056855 A208653 A080073 * A114694 A272337 A132678
KEYWORD
nonn,base,easy
STATUS
approved