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

%I #18 Jun 20 2021 15:21:59

%S 0,2,3,4,5,6,15,16,18,19,20,21,22,24,26,27,28,29,30,32,34,35,36,37,38,

%T 40,42,43,44,45,46,48,50,51,52,53,54,57,71,87,95,103,111,119,120,122,

%U 123,124,125,126,128,130,131,132,133,134,143,144,146,147,148,149,150

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

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

%t Select[Range[0,150],DigitCount[#,8,1]==DigitCount[#,8,7]&] (* _Harvey P. Dale_, Feb 08 2011 *)

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

%K nonn,base,easy

%O 1,2

%A _Olivier GĂ©rard_