login
Numbers with exactly two distinct base-8 digits.
2

%I #16 Aug 10 2021 11:07:35

%S 8,10,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,28,29,30,31,32,33,

%T 34,35,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,55,56,57,58,59,

%U 60,61,62,64,65,72,74,75,76,77,78,79,81,82,89,91,97,100,105

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

%H <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.

%t Select[Range[100],Length[Union[IntegerDigits[#,8]]]==2&] (* _Harvey P. Dale_, Feb 15 2019 *)

%o (PARI) is(n)=#Set(digits(n, 8))==2 \\ _Charles R Greathouse IV_, Feb 15 2017

%o (Python)

%o def ok(n): return len(set(oct(n)[2:])) == 2

%o print(list(filter(ok, range(106)))) # _Michael S. Branicky_, Aug 10 2021

%Y Cf. A031948 - A031955.

%K nonn,base,easy

%O 1,1

%A _Clark Kimberling_

%E Name edited by _Michael S. Branicky_, Aug 10 2021