[go: up one dir, main page]

login
A032914
Numbers whose set of base-7 digits is {1,3}.
1
1, 3, 8, 10, 22, 24, 57, 59, 71, 73, 155, 157, 169, 171, 400, 402, 414, 416, 498, 500, 512, 514, 1086, 1088, 1100, 1102, 1184, 1186, 1198, 1200, 2801, 2803, 2815, 2817, 2899, 2901, 2913, 2915, 3487, 3489, 3501, 3503, 3585, 3587
OFFSET
1,2
LINKS
MATHEMATICA
Flatten[Table[FromDigits[#, 7]&/@Tuples[{1, 3}, n], {n, 5}]] (* Vincenzo Librandi, Jun 01 2012 *)
PROG
(Magma) [n: n in [1..4000] | Set(IntegerToSequence(n, 7)) subset {1, 3}]; // Vincenzo Librandi, Jun 01 2012
(Python)
def A032914(n): return (int(bin(m:=n+1)[3:], 7)<<1) + (7**(m.bit_length()-1)-1)//6 # Chai Wah Wu, Oct 13 2023
CROSSREFS
Sequence in context: A346370 A373200 A332976 * A088072 A213033 A305176
KEYWORD
nonn,base
STATUS
approved