login
A032920
Numbers whose set of base-13 digits is {1,3}.
1
1, 3, 14, 16, 40, 42, 183, 185, 209, 211, 521, 523, 547, 549, 2380, 2382, 2406, 2408, 2718, 2720, 2744, 2746, 6774, 6776, 6800, 6802, 7112, 7114, 7138, 7140, 30941, 30943, 30967, 30969, 31279, 31281, 31305, 31307, 35335, 35337
OFFSET
1,2
LINKS
MATHEMATICA
Flatten[Table[FromDigits[#, 13]&/@Tuples[{1, 3}, n], {n, 5}]] (* Vincenzo Librandi, Jun 03 2012 *)
PROG
(Magma) [n: n in [1..36000] | Set(IntegerToSequence(n, 13)) subset {1, 3}]; // Vincenzo Librandi, Jun 03 2012
(Python)
def A032920(n): return (int(bin(m:=n+1)[3:], 13)<<1) + (13**(m.bit_length()-1)-1)//12 # Chai Wah Wu, Oct 13 2023
CROSSREFS
Sequence in context: A195864 A349767 A022890 * A134767 A022125 A121459
KEYWORD
nonn,base
STATUS
approved