login
A032913
Numbers whose set of base-6 digits is {1,3}.
1
1, 3, 7, 9, 19, 21, 43, 45, 55, 57, 115, 117, 127, 129, 259, 261, 271, 273, 331, 333, 343, 345, 691, 693, 703, 705, 763, 765, 775, 777, 1555, 1557, 1567, 1569, 1627, 1629, 1639, 1641, 1987, 1989, 1999, 2001, 2059, 2061, 2071, 2073
OFFSET
1,2
LINKS
MATHEMATICA
Flatten[Table[FromDigits[#, 6]&/@Tuples[{1, 3}, n], {n, 5}]] (* Harvey P. Dale, Nov 16 2011 *)
PROG
(Magma) [n: n in [1..2500] | Set(IntegerToSequence(n, 6)) subset {1, 3}]; // Vincenzo Librandi, Jun 01 2012
(Python)
def A032913(n): return (int(bin(m:=n+1)[3:], 6)<<1) + (6**(m.bit_length()-1)-1)//5 # Chai Wah Wu, Oct 13 2023
CROSSREFS
Sequence in context: A324699 A110674 A003528 * A353397 A261072 A154508
KEYWORD
nonn,base
STATUS
approved