OFFSET
1,1
COMMENTS
Integers n such that in Base 2, number of `1`'s = twice number of `0`'s. IntegerDigits[43,2]={1,0,1,0,1,1},IntegerDigits[60,2]={1,1,1,1,0,0},... - Vladimir Joseph Stephan Orlovsky, Jul 21 2009
MATHEMATICA
f0[n_]:=DigitCount[n, 2, 0]; f1[n_]:=DigitCount[n, 2, 1]; f[n_]:=f1[n]/f0[n]; lst={}; Do[If[f[n]==2, AppendTo[lst, n]], {n, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jul 21 2009 *)
Select[Range[500], DigitCount[#, 2, 1]==2*DigitCount[#, 2, 0]&] (* Harvey P. Dale, May 22 2013 *)
PROG
(PARI) is(n)=hammingweight(n)==2/3*#binary(n) \\ Charles R Greathouse IV, May 28 2013
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Ctibor O. Zizka, Mar 11 2008
STATUS
approved