OFFSET
1,1
COMMENTS
The three-digit terms are given by A210666(1,...,244). For numbers with exactly two distinct (but unspecified) digits in other bases, see A031948-A031954. For numbers made of two *given* digits, see A007088 (digits 0 & 1), A007931 (digits 1 & 2), A032810 (digits 2 & 3), A032834 (digits 3 & 4), A256290 (digits 4 & 5), A256291 (digits 5 & 6), A256292 (digits 6 & 7), A256340 (digits 7 & 8), A256341 (digits 8 & 9), and A032804-A032816 (in other bases). - M. F. Hasler, Apr 04 2015
A235154 is a subsequence. - Altug Alkan, Dec 03 2015
A235717 is a subsequence. - Robert Israel, Dec 03 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
A043537(a(n)) = 2. - Reinhard Zumkeller, Dec 03 2009
MAPLE
M:= 5: # to get all terms < 10^M
sort([seq(seq(seq(seq(add(10^(m-j)*`if`(member(j, S2), d2, d1), j=1..m) ,
S2 = combinat:-powerset({$2..m}) minus {{}}),
d2 = {$0..9} minus {d1}), d1 = 1..9), m=2..M)]); # Robert Israel, Dec 03 2015
MATHEMATICA
Select[Range@ 166, Length@ Union@ IntegerDigits@ # == 2 &] (* Michael De Vlieger, Dec 03 2015 *)
PROG
(Haskell)
a031955 n = a031955_list !! (n-1)
a031955_list = filter ((== 2) . a043537) [0..]
-- Reinhard Zumkeller, Feb 05 2012
(PARI) is_A031955(n)=#Set(digits(n))==2 \\ M. F. Hasler, Apr 04 2015
(Python)
def ok(n): return len(set(str(n))) == 2
print(list(filter(ok, range(167)))) # Michael S. Branicky, Oct 12 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Name edited by Charles R Greathouse IV, Feb 13 2017
STATUS
approved