login
Numbers with exactly two distinct base-3 digits.
7

%I #16 Nov 25 2023 16:16:53

%S 3,5,6,7,9,10,12,14,16,17,18,20,22,23,24,25,27,28,30,31,36,37,39,41,

%T 43,44,49,50,52,53,54,56,60,62,67,68,70,71,72,74,76,77,78,79,81,82,84,

%U 85,90,91,93,94,108,109,111,112,117,118,120,122

%N Numbers with exactly two distinct base-3 digits.

%H Robert Israel, <a href="/A031948/b031948.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= n -> nops(convert(convert(n,base,3),set))=2:

%p select(filter, [$1..200]); # _Robert Israel_, Nov 29 2017

%t Select[Range[150],Length[Union[IntegerDigits[#,3]]]==2&] (* _Harvey P. Dale_, Nov 25 2023 *)

%Y Cf. A007089.

%K nonn,base

%O 1,1

%A _Clark Kimberling_