login
Numbers whose base-9 representation has the same number of 1's and 8's.
1

%I #17 Jun 24 2021 23:57:39

%S 0,2,3,4,5,6,7,17,18,20,21,22,23,24,25,27,29,30,31,32,33,34,36,38,39,

%T 40,41,42,43,45,47,48,49,50,51,52,54,56,57,58,59,60,61,63,65,66,67,68,

%U 69,70,73,89,107,116,125,134,143,152,153,155,156,157,158,159,160,162

%N Numbers whose base-9 representation has the same number of 1's and 8's.

%H G. C. Greubel, <a href="/A039090/b039090.txt">Table of n, a(n) for n = 1..5000</a>

%t Select[Range[0,200],DigitCount[#,9,1]==DigitCount[#,9,8]&] (* _Harvey P. Dale_, Aug 08 2012 *)

%o (PARI) isok(n) = my(d=digits(n, 9)); #select(x->(x==1), d) == #select(x->(x==8), d); \\ _Michel Marcus_, Nov 01 2017

%K nonn,base,easy

%O 1,2

%A _Olivier GĂ©rard_