OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
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
KEYWORD
nonn,base
AUTHOR
STATUS
approved