login
A032918
Numbers whose set of base-11 digits is {1,3}.
1
1, 3, 12, 14, 34, 36, 133, 135, 155, 157, 375, 377, 397, 399, 1464, 1466, 1486, 1488, 1706, 1708, 1728, 1730, 4126, 4128, 4148, 4150, 4368, 4370, 4390, 4392, 16105, 16107, 16127, 16129, 16347, 16349, 16369, 16371, 18767, 18769, 18789, 18791, 19009, 19011
OFFSET
1,2
LINKS
MATHEMATICA
fQ[n_]:=Union@Join[{1, 3}, IntegerDigits[n, 11]]=={1, 3}; Select[Range[0, 20000], fQ] (* Vincenzo Librandi, May 25 2012 *)
PROG
(Magma) [n: n in [1..21000] | Set(IntegerToSequence(n, 11)) subset {1, 3}]; // Bruno Berselli, May 25 2012
(Python)
def A032918(n): return (int(bin(m:=n+1)[3:], 11)<<1) + (11**(m.bit_length()-1)-1)//10 # Chai Wah Wu, Oct 13 2023
CROSSREFS
Sequence in context: A176796 A242130 A286386 * A039945 A227302 A201273
KEYWORD
nonn,base
STATUS
approved