OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (first 648 terms from T. D. Noe)
MAPLE
f:= proc(d, b) uses combinat; local S, Res, A1, A1p, A2, x1, x2;
Res:= NULL:
for S in choose({$0..b-1}, 3) do
x1:= S[3]*(b^d-1)/(b-1);
for A1 in powerset(d) minus {{}} do
if S[1]=0 and member(d, A1) then next fi;
x2:= x1 + (S[1]-S[3])*add(b^(j-1), j=A1);
A1p:= {$1..d} minus A1;
for A2 in powerset(A1p) minus {{}, A1p} do
Res:= Res, x2 + (S[2]-S[3])*add(b^(j-1), j=A2);
od
od
od;
op(sort([Res]));
end proc:
f(3, 10), f(4, 10); # Robert Israel, Oct 29 2018
MATHEMATICA
Select[Range[100, 200], Length[Union[IntegerDigits[#]]] == 3 &] (* T. D. Noe, Dec 04 2012 *)
Select[Range[100, 200], Count[DigitCount[#], 0]==7&] (* Harvey P. Dale, May 22 2020 *)
PROG
(PARI) isok(n) = #Set(digits(n)) == 3; \\ Michel Marcus, Oct 29 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited by Robert Israel, Oct 29 2018
STATUS
approved