OFFSET
1,1
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
MAPLE
q:= n-> numboccur(2, convert(n, base, 10))=2:
select(q, [$2..2222])[]; # Alois P. Heinz, Mar 15 2020
MATHEMATICA
Select[Range[5000], DigitCount[#, 10, 2] == 2 &] (* Vincenzo Librandi, Nov 20 2015 *)
PROG
(PARI) c(k, d, b) = {my(c=0, f); while (k>b-1, f=k-b*(k\b); if (f==d, c++); k\=b); if (k==d, c++); return(c)}
for(n=0, 2000, if(c(n, 2, 10)==2, print1(n, ", "))) \\ Altug Alkan, Nov 20 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved